|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-01-06 17:35 UTC] sniper@php.net
[2004-01-06 17:37 UTC] sniper@php.net
[2004-01-25 18:49 UTC] iliaa@php.net
[2004-03-29 18:30 UTC] magnus at monkerud dot com
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 21:00:01 2025 UTC |
Description: ------------ I don't know if this is considered a bug, but in my opinion it's undesirable behavior. I'm finding that if I try to include a file that has a parse error, the file is not included -- the include function used returns false -- but the "included" file name is in the array returned by get_included_files(). Reproduce code: --------------- (file 1) <?php $worked = "NO"; echo "*", include_once( 'included.php' ), "*"; echo "<pre>"; var_dump( get_included_files() ); echo "</pre>"; echo "#{$worked}#"; ?> (file 2) <?php $worked = "YES"; $name = "blah "whatever"; ?> Expected result: ---------------- Since there is a parse error in the "included" file, and include_once() returns false, I expect the name of the "included" file not to appear in the array returned by get_included_files(). Actual result: -------------- include_once() returns false, yet the name of the "included" file is in the array returned by get_included_files().