Hi, > On 8 Feb 2015, at 02:51, Andrea Faulds <a...@ajf.me> wrote: > > Yes, the RFC is somewhat inaccurate in that respect. It is per-file in one > sense (like encoding, but unlike ticks, it has no effect on the including or > included files). However, it technically affects the remainder of the file, > not the whole file.
A minor follow-up: the RFC does actually mention this specific point about declare()’s behaviour: > By default, all PHP files are in weak type-checking mode. A new declare() > directive is added, strict_types, which takes either 1 or 0. If 1, strict > type-checking mode is used for function calls and return statements in the > remainder of the file. If 0, weak type-checking mode is used. > > This directive also supports the declare() block syntax (e.g. > declare(strict_types=1) { foo(); }), in which case it will only affect > function calls and return statements within the block. -- Andrea Faulds http://ajf.me/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php