@josemanuel Fails because symbols are not strings. Why on earth does that work?
@worldsendless It's not a strict equality test, so it kinda makes sense to have No changed to 'No' to make it work. It's the same thing you'd get if you tried `0 == '0'`.
If you think about it, Common Lisp does the same. ASDF, for instance, accepts both `:system` and `"system"` as system identifiers.
Nevertheless, as @zimzat pointed out elsewhere in this thread, PHP no longer works that way in modern versions, so I'd urge you to upgrade for a better experience.
@worldsendless You're going to hit every landmine PHP has ever had.
Use the latest supported versions; `== No` is no longer possible in 8.0+ https://www.php.net/supported-versions.php https://3v4l.org/I0GqJ
Ensure you're running with https://www.php.net/manual/en/errorfunc.configuration.php#ini.error-reporting = E_ALL
`php -a` is the closest thing to a native repl, but there's others like https://github.com/ramsey/composer-repl or https://psysh.org/
Or step debugging with https://xdebug.org/docs/step_debug
@worldsendless PhpStorm is worth the cost if you're doing any amount of serious coding: https://www.jetbrains.com/phpstorm/
@zimzat We are running a fair-sized #WordPress operation here so changing the versions and the configs isn't done easily, and because the workforce is largely transient university student developers we cannot pay licensing fees for a specialized tool like PHP Storm; the students are on #VSCode and I am on #emacs, both of which are great for working in many languages
PhpStorm has paid per-seat transferable business licenses.
Upgrading the version has be a minimum requirement: PHP 7.4 and earlier is no longer supported, no matter what WordPress says their minimum is.
It sounds like you're in a bind unless you treat it like a https://en.wikipedia.org/wiki/Gordian_Knot
@worldsendless this produces en error since PHP 8 (released 3 years ago). PHP 7 has reached EOL on november 2022.
@manal The big takeaway I'm gathering from this thread is that I need to bite the bullet and get the upgraded PHP on our server, at the risk of our WordPress farm of 100+ sites...
@worldsendless What would make sense to you?