note 110568 deleted from functions.user-defined by googleguy

From: Date: Thu, 08 Nov 2012 00:38:51 +0000
Subject: note 110568 deleted from functions.user-defined by googleguy
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-191801@lists.php.net to get a copy of this message
Note Submitter: anonymous ---- Functions seem to be declared in memory before runtime. Therefore in the previous example, B() does exist when you call it, but the second echo will not parse due to the "return" construct placed outside of the function and in the global scope. If you want the second "echo" to appear, simply remove the return. The entire script stops on the "return" being placed in the global scope, similarly to using an "exit()" call.

« previous php.notes (#191801) next »