note 114037 added to function.require-once
| From: | acholoc at gmail dot com | Date: | Sat, 04 Jan 2014 21:43:04 +0000 |
| Subject: | note 114037 added to function.require-once | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-198106@lists.php.net to get a copy of this message | ||
I think it's important (at least for beginners) to mention somewhere clearly visible that
require_once, when being used in a class, cannot be outside a function. (I am aware that even this,
i.e. using it within the function is bad practice). However, that information could have saved me
some valuable time troubleshooting the "unexpected T_REQUIRE_ONCE" error.
----
Server IP: 72.52.91.14
Probable Submitter: 72.52.91.14
----
Manual Page -- http://php.net/manual/en/function.require-once.php
Edit -- https://master.php.net/note/edit/114037
Del: integrated -- https://master.php.net/note/delete/114037/integrated
Del: useless -- https://master.php.net/note/delete/114037/useless
Del: bad code -- https://master.php.net/note/delete/114037/bad+code
Del: spam -- https://master.php.net/note/delete/114037/spam
Del: non-english -- https://master.php.net/note/delete/114037/non-english
Del: in docs -- https://master.php.net/note/delete/114037/in+docs
Del: other reasons-- https://master.php.net/note/delete/114037
Reject -- https://master.php.net/note/reject/114037
Search -- https://master.php.net/manage/user-notes.php