note 59990 deleted from language.functions by philip

From: Date: Fri, 17 Mar 2006 00:01:29 +0000
Subject: note 59990 deleted from language.functions by philip
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-105955@lists.php.net to get a copy of this message
Note Submitter: manish at operamail dot com ---- <?php $makefoo = true; /* We can't call foo() from here since it doesn't exist yet, but we can call bar() */ bar(); if ($makefoo) { function foo() { echo "I don't exist until program execution reaches me.\n"; } } /* Now we can safely call foo() since $makefoo evaluated to true */ if ($makefoo) foo(); function bar() { echo "I exist immediately upon program start.\n"; } ?>

« previous php.notes (#105955) next »