[wp-trac] [WordPress Trac] #47751: PHP 7.4 compatibility fix / accessing arrays/string using curly brace syntax

WordPress Trac noreply at wordpress.org
Sat Aug 3 20:20:52 UTC 2019


#47751: PHP 7.4 compatibility fix / accessing arrays/string using curly brace
syntax
-------------------------------------------------+-------------------------
 Reporter:  jrf                                  |       Owner:  (none)
     Type:  defect (bug)                         |      Status:  new
 Priority:  normal                               |   Milestone:  5.3
Component:  General                              |     Version:
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch has-unit-tests 2nd-        |     Focuses:  coding-
  opinion                                        |  standards
-------------------------------------------------+-------------------------

Comment (by jorbin):

 In [changeset:"45730" 45730]:
 {{{
 #!CommitTicketReference repository="" revision="45730"
 PHP 7.4 compatibility fix / accessing arrays/string using curly brace
 syntax

 PHP used to allow both square brackets and curly braces to be used
 interchangeably for accessing array elements and string offsets. The curly
 bracket syntax is only allowed in a limited set of cases and can be
 confusing for people not used to it.
 PHP 7.4 will deprecate the curly brace syntax for accessing array elements
 and string offsets and it is expected that support will be completely
 removed in PHP 8.0.
 Ref: https://wiki.php.net/rfc/deprecate_curly_braces_array_access

 See #47751.
 Props jrf.
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/47751#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list