If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

In PHP 7.0 the following functionality/features changed:
a) class constructors must be called __construct and not just be the same function name as the class anymore.
b) indirection - use of $$foo['bar']['baz'] needs to be rewritten as ${$foo['bar']['baz']} else it will be seen as ($$foo)['bar']['baz']. Also, $foo->$bar['baz'] has to be rewritten as $foo->{$bar['baz']} if that's what was intended.
c) switch() statements cannot have multiple "default:" blocks

In PHP 7.1 there were numerous changes, but few likely to impact regular Zen Cart use
PHP 7.1 is nearly identical to PHP 7.0 in terms of compatibility, but 7.1 is faster, so there's no point in using 7.0 if 7.1 is available to you!

For PHP 7.2 the following changes are required:
a) calls to each() are deprecated; use foreach() instead. See examples here: Refactor each() to foreach() for compatibility with PHP 7.2
b) create_function() is deprecated. Use anonymous functions ("Closures") instead.
c) The __autoload() mechanism is deprecated in favor of spl_autoload_register() instead.

For PHP 7.3 the only change found necessary in Zen Cart (over PHP 7.2 compatibility) was:
- using the "continue" statement inside a "switch" loop -- should be changed to "break"
- many "strict" conditions now trigger notices

Other notes about 7.3:
- calls to compact() with undefined variables will cause errors
- In case of troubleshooting rare problems that could be caused by the very few SPL autoloads in ZC, that any SPL Autoloads that fail will cause all subsequents to fail too, instead of just a warning in previous PHP versions.