note 86072 deleted from language.constants by danbrown

[email protected]
Newsgroups php.notes
Message-ID <[email protected]>
Note Submitter: lezambranof at gmail dot com
Reason: non-english

----

Las constantes solo puede albergar valores escalares, pero utilizando la función eval() puedes resolver el problema de definir una constante con el resultado de una función.

por ejemplo:

<?php
     eval("define(\"HOY\",\"".date("Y-m-d")."\");");
?>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.