note 70213 added to function.function-exists

From: Date: Fri, 06 Oct 2006 22:55:43 +0000
Subject: note 70213 added to function.function-exists
Groups: php.notes 
Request: Send a blank email to php-notes+get-118159@lists.php.net to get a copy of this message
To this post: neelam_ab2003 at yahoo dot co dot in 11-May-2006 12:06 <?php /*PHP doesn't Support nested functions. I have tried following in PHP_VERSION - 5.1.2*/ function A(){} function B(){ function C(){ function D(){} } } . . . Nor should it. To the code outside function B(), the function C does not exist (in its scope). If you call function B(), the function C gets created (and by way of extension D) but then gets destroyed by the time B finishes (garbage collection). This is a very useful feature of PHP. Why would you need to know if function C exists and is not in your scope? ---- Server IP: 64.71.164.2 Probable Submitter: 18.243.2.79 ---- Manual Page -- http://www.php.net/manual/en/function.function-exists.php Edit -- https://master.php.net/note/edit/70213 Del: integrated -- https://master.php.net/note/delete/70213/integrated Del: useless -- https://master.php.net/note/delete/70213/useless Del: bad code -- https://master.php.net/note/delete/70213/bad+code Del: spam -- https://master.php.net/note/delete/70213/spam Del: non-english -- https://master.php.net/note/delete/70213/non-english Del: in docs -- https://master.php.net/note/delete/70213/in+docs Del: other reasons-- https://master.php.net/note/delete/70213 Reject -- https://master.php.net/note/reject/70213 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#118159) next »