note 100627 added to language.functions

From: Date: Wed, 27 Oct 2010 15:35:25 +0000
Subject: note 100627 added to language.functions
Groups: php.notes 
Request: Send a blank email to php-notes+get-173506@lists.php.net to get a copy of this message
If you define function within another function, it can be accessed directly, but after calling parent function. For example: <?php function a () { function b() { echo "I am b."; } echo "I am a.<br/>"; } //b(); Fatal error: Call to undefined function b() in E:\..\func.php on line 8 a(); // Print I am a. b(); // Print I am b. ?> ---- Server IP: 69.147.83.197 Probable Submitter: 91.202.241.224 ---- Manual Page -- http://www.php.net/manual/en/language.functions.php Edit -- https://master.php.net/note/edit/100627 Del: integrated -- https://master.php.net/note/delete/100627/integrated Del: useless -- https://master.php.net/note/delete/100627/useless Del: bad code -- https://master.php.net/note/delete/100627/bad+code Del: spam -- https://master.php.net/note/delete/100627/spam Del: non-english -- https://master.php.net/note/delete/100627/non-english Del: in docs -- https://master.php.net/note/delete/100627/in+docs Del: other reasons-- https://master.php.net/note/delete/100627 Reject -- https://master.php.net/note/reject/100627 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#173506) next »