Yay! <3 PHP.
Also, the moment I read declare(strict_types..., for some reason "use strict"; from ECMAScript flashed in front of me :D
Also, the moment I read declare(strict_types..., for some reason "use strict"; from ECMAScript flashed in front of me :D
I break down all of the proposed alternatives and the cases against them.
php > use strict;
PHP Fatal error: You seem to be trying to use a different language... in php shell code on line 1
>>> from __future__ import braces
File "<stdin>", line 1
SyntaxError: not a chance "use strict";
(note 'use' is part of a string) should work in PHP for the same reason it does in ECMAScript -- it is a no-op at the language level (creating a string literal and doing nothing with it), that is unlikely to appear in old code, and can be given new meaning in the next-level language spec.