|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2008-01-28 23:19 UTC] tony2001@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 26 01:00:02 2025 UTC |
Description: ------------ Run the snippet. It should produce two warnings. But the include function is inexplicably prefixed with my class name. Reproduce code: --------------- class MyClass { static public function loadCode($p) { return include $p; } } MyClass::loadCode('I_DO_NOT_EXIST'); Expected result: ---------------- Warning: include(I_DO_NOT_EXIST) [function.include]: failed to open stream: No such file or directory in ... Warning: include() [function.include]: Failed opening 'I_DO_NOT_EXIST' for inclusion (include_path='.;C:\php5\pear') in ... Actual result: -------------- Warning: MyClass::include(I_DO_NOT_EXIST) [function.MyClass-include]: failed to open stream: No such file or directory in ... Warning: MyClass::include() [function.include]: Failed opening 'I_DO_NOT_EXIST' for inclusion (include_path='.;C:\php5\pear') in ...