|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2007-01-12 17:20 UTC] iliaa@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 04:00:01 2025 UTC |
Description: ------------ The php parsing engine will not allow class methods that are named include/require/include_once/require_once. While I understand why you cannot create functions with these names, $object->include() or CLASS::include() in no way conflicts with include(). Is there a reason for this or is it an oversight in the parser? Reproduce code: --------------- <?php class MW { function require_once($file) { } } ?> Expected result: ---------------- No parse error =) Actual result: -------------- Parse error: syntax error, unexpected T_REQUIRE_ONCE, expecting T_STRING in .....