|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-07-11 14:56 UTC] tony2001@php.net
[2006-07-14 13:37 UTC] kristiankjaergaard at gmail dot com
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 22:00:02 2025 UTC |
Description: ------------ When files are included from within classes, variables are not passed on to the included files. Reproduce code: --------------- a.php: <?php class Factory { static function doinclude() { include_once('b.php'); } } $var = "I've found a bug"; var_dump($var); Factory::doinclude(); ?> b.php: <?php var_dump($var); ?> Expected result: ---------------- string(16) "I've found a bug" string(16) "I've found a bug" Actual result: -------------- string(16) "I've found a bug" NULL