note 83239 deleted from language.constants by danbrown
| From: | danbrown@php.net | Date: | Fri, 12 Jun 2009 22:18:08 +0000 |
| Subject: | note 83239 deleted from language.constants by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-156823@lists.php.net to get a copy of this message | ||
Note Submitter: ian at willis dot org dot uk
----
Another difference - you cannot use a constant to reference a function.
<?php
function ccc()
{
echo "CCC\n";
}
function vvv()
{
echo "VVV\n";
}
define('cfunc', 'ccc');
$vfunc = 'vvv';
$vfunc(); // Works
cfunc(); // Fails
?>
Displays:
VVV
Fatal error: Call to undefined function cfunc() in /tmp/test.php on line 17