On 09/04/12 13:29, Tom Boutell wrote:
> I would like to clarify what this RFC actually says. Let's try to keep
> this thread to the pros and cons of this specific proposal.
>
> The following new keyword would be introduced:
>
> require_path
I don't like the keyword name. Too confusing with the include_path
configuration option for something very different.

What about require_file ?


> This keyword has two parameters of which the second is optional. The
> first parameter is the path (filename or URL) to be required, and
> behaves exactly as the sole parameter of the require keyword behaves.
> The second parameter is an associative array.
Does it require brackets?



> If 'warn' is present and true, a loading or compilation error results
> in E_WARNING (per the current behavior of the include keyword). If
> warn is absent or false, a loading or compilation error results in
> E_COMPILE_ERROR (per the current behavior of the require keyword).
What if I want to silently ignore a missing-file condition?
Ie. no warning or compile error if there file is not there (presumably
to skip the need of a file_exist), yet receive all warnings generated by
the included code.

What about 'missing'=> 'error' / 'warn' / 'ignore' ?


> If 'code' is present and true, the parser begins reading the file as
> if a <?php open tag had already been encountered. If code is absent or
> false, the parser reads the file beginning in “HTML mode,” exactly as
> the require keyword does today.
I think "reading the file as if a <?php open tag had already been
encountered" should add
"with the exception that an explicit <?php exactly at the beginning of
the file is not a parse error but silently ignored".


Best regards


-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to