This is in reference to: https://twitter.com/ramsey/status/1167954877814730755
header.php file comes directly from a client site, developed by someone else, with all
identifying and account information replaced.
Any of the
<?php tags could hypothetically be replaced by a tag that would indicate a different set
of rules for only that segment of code, e.g.
<?p8 could be introduced to support all the strictness
that the advocates of strictness desire. This would give them the strictness where they want it and
let everyone else continue to stick with
<?php for use in PHP 8.
Futher, by using tags we can incrementally refactor and/or we can, for example, choose methods in a class where we want more strictness and for other methods that need less strictness we can still have that, all in the same file and all processed by the same single (future) PHP 8.x engine.
IMO incremental refactoring is the killer language feature; one that not only enables but also encourages refactoring — little by little — to better practices, and one that does not force the entire file or site to be refactored completely before re-deployment.
Note I am not proposing much difference between code that works with
<?php and code that works with
<?p8; the only difference would be those things that absolutely require a BC break and where there
can be no resolution between those who advocate for — euphamistically speaking — the
strict father model
and the nurturing parent model.
In the above metaphor, the PHP language processor itself is the parent and its model is defined by strictness it requires and/or the lenience it allows.