@@ -351,22 +351,32 @@ PHP 7.4 UPGRADE NOTES
351
351
. The array and string offset access syntax using curly braces is deprecated.
352
352
Use $str[$idx] instead of $str{$idx}.
353
353
RFC: https://wiki.php.net/rfc/deprecate_curly_braces_array_access
354
+ . The (real) cast is deprecated, use (float) instead.
354
355
. Unbinding $this of a non-static method through a combination of
355
356
ReflectionMethod::getClosure() and closure rebinding is deprecated. Doing
356
357
so is equivalent to calling a non-static method statically, which has been
357
358
deprecated since PHP 7.0.
359
+ . Unbinding $this of a non-static closure is deprecated.
358
360
. Using "parent" inside a class without parent is deprecated, and will throw
359
361
a compile-time error in the future. Currently an error will only be
360
362
generated if/when the parent is accessed at run-time.
363
+ . The allow_url_include ini directive is deprecated. Enabling it will generate
364
+ a deprecation notice at startup.
361
365
362
366
- COM:
363
367
. Importing type libraries with case-insensitive constant registering has been
364
368
deprecated.
365
369
370
+ - Filter:
371
+ . FILTER_SANITIZE_MAGIC_QUOTES is deprecated, use FILTER_SANITIZER_ADD_SLASHES
372
+ instead.
373
+
366
374
- Mbstring:
367
375
. Passing a non-string pattern to mb_ereg_replace() is deprecated. Currently
368
376
non-string patterns are interpreted as ASCII codepoints. In PHP 8 the
369
377
pattern will be interpreted as a string instead.
378
+ . Passing the encoding as 3rd parameter to mb_strrpos() is deprecated. Instead
379
+ pass a 0 offset and encoding as 4th parameter.
370
380
371
381
- LDAP:
372
382
. ldap_control_paged_result_response and ldap_control_paged_result are
@@ -377,13 +387,36 @@ PHP 7.4 UPGRADE NOTES
377
387
This method has been deprecated in favor of ReflectionNamedType::getName()
378
388
in the documentation since PHP 7.1, but did not throw a deprecation notice
379
389
for technical reasons.
390
+ . The export() methods on all Reflection classes are deprecated. Construct a
391
+ Reflection object and convert it to string instead:
392
+
393
+ // ReflectionClass::export(Foo::class, false) is:
394
+ echo new ReflectionClass(Foo::class), "\n";
395
+ // $str = ReflectionClass::export(Foo::class, true) is:
396
+ $str = (string) new ReflectionClass(Foo::class);
380
397
381
398
- Standard:
382
399
. Passing invalid characters to ''base_convert()'', ''bindec()'', ''octdec()''
383
400
and ''hexdec()'' will now generate a deprecation notice. The result will
384
401
still be computed as if the invalid characters did not exist. Leading and
385
402
trailing whitespace, as well as prefixes of type 0x (depending on base)
386
403
continue to be allowed.
404
+ . Using array_key_exists() on objects is deprecated. Instead either isset()
405
+ or property_exists() should be used.
406
+ . The is_real() function is deprecated, use is_float() instead.
407
+ . The get_magic_quotes_gpc() and get_magic_quotes_runtime() functions are
408
+ deprecated. They always return false.
409
+ . The hebrevc() function is deprecated. It can be replaced with
410
+ nl2br(hebrev($str)), or preferably the use of Unicode RTL support.
411
+ . The convert_cyr_string() function is deprecated. It can be replaced by one
412
+ of mb_convert_string(), iconv() or UConverter.
413
+ . The money_format() function is deprecated. It can be replaced by the
414
+ intl NumberFormatter functionality.
415
+ . The ezmlm_hash() function is deprecated.
416
+ . The restore_include_path() function is deprecated. It can be replace by
417
+ ini_restore('include_path').
418
+ . Passing parameters to implode() in reverse order is deprecated, use
419
+ implode($glue, $parts) instead of implode($parts, $glue).
387
420
388
421
========================================
389
422
5. Changed Functions
0 commit comments