note 33694 added to function.require

From: Date: Fri, 04 Jul 2003 06:43:45 +0000
Subject: note 33694 added to function.require
Groups: php.notes 
Request: Send a blank email to php-notes+get-51495@lists.php.net to get a copy of this message
Contrary to the previous poster's experience (which is also exactly what I want to happen), this does not seem to work for me. A class declared in an included file from within a function does not seem to be available outside the function. This is with PHP 4.3.2 on a windows box. Perhaps its works in linux?? Easy test: function test() { class duh { var $d; } $a = new duh; // This works, } $a = new duh; // while this does not What gives? Can it be done or not, and how? ---- Manual Page -- http://www.php.net/manual/en/function.require.php Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+33694 Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+33694&report=yes Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+33694&report=yes

« previous php.notes (#51495) next »