Closed jorgeatorres closed 3 years ago
# Run with PHP 8 in the PATH or replace php by the correct binary.
find . \( -path ./tmp -o -path ./tests -o -path ./vendor \) -prune -o \( -name '*.php' \) -exec php -lf {} \;
phpcs -p . --standard=PHPCompatibility --runtime-set testVersion 8.0
call_user_func_array()
array keys will now be interpreted as parameter names, instead of being silently ignored.
do_action_ref_array()
.apply_filters_ref_array()
.[x] ⚠️ Non-strict comparisons between numbers and non-numeric strings now work by casting the number to string and comparing the strings. Comparisons between numbers and numeric strings continue to work as before.
Example: 0 == 'astring'
now evaluates to false
.
implode()
with parameters in a reverse order ($pieces, $glue)
is no longer supported.parse_str()
can no longer be used without specifying a result array.strpos()
, strrpos()
, stripos()
, strripos()
, strstr()
, strchr()
, strrchr()
, and stristr()
will now always be interpreted as a string. Previously non-string needles were interpreted as an ASCII code point.match
is now a reserved keyword.parse_url()
will now distinguish absent and empty queries and fragmentstrue
or false
should be replaced with an implementation that returns an integer less than, equal to, or greater than zero.substr()
, mb_substr()
, iconv_substr()
and grapheme_substr()
now consistently clamp out-of-bounds offsets to the string boundary. Previously, false was returned instead of the empty string in some cases.array_key_exists()
with objects.@
operator will no longer silence fatal errors.mktime()
and gmmktime()
now require at least one argument.openssl_x509_read()
and openssl_csr_sign()
will now return an OpenSSLCertificate
object rather than a resource. Return value checks using is_resource()
should be replaced with checks for false
.stdClass
object for null
, false
and empty strings.PHP_INT_MAX
key is already used.__call(string $name, array $arguments): mixed
__callStatic(string $name, array $arguments): mixed
__clone(): void
__debugInfo(): ?array
__get(string $name): mixed
__invoke(mixed $arguments): mixed
__isset(string $name): bool
__serialize(): array
__set(string $name, mixed $value): void
__set_state(array $properties): object
__sleep(): array
__unserialize(array $data): void
__unset(string $name): void
__wakeup(): void
While testing, I noticed a deprecation warning (WC 4.4.0) and logged #836 to investigate. This is not PHP 8 specific.
PHP 8.0 is planned for November 26th. We need to test and make sure the plugin works with this version.
See https://github.com/php/php-src/blob/107962208a19d8b6dc1a190cb25fc37614411e71/UPGRADING.