[wp-trac] [WordPress Trac] #48400: Coding Standards: Revisit decision to keep PHP 'array()' notation and switch to modern '[]' bracket notation

WordPress Trac noreply at wordpress.org
Fri Mar 15 00:00:19 UTC 2024


#48400: Coding Standards: Revisit decision to keep PHP 'array()' notation and
switch to modern '[]' bracket notation
-------------------------+-------------------------------
 Reporter:  apedog       |       Owner:  (none)
     Type:  enhancement  |      Status:  closed
 Priority:  normal       |   Milestone:
Component:  General      |     Version:
 Severity:  normal       |  Resolution:  wontfix
 Keywords:               |     Focuses:  coding-standards
-------------------------+-------------------------------

Comment (by Cybr):

 WordPress has about 3620 cases of adding to arrays and 39000 cases of
 reading arrays using square brackets in PHP. Switching back to parentheses
 to create 20216 arrays makes zero sense.

 When PHP started to take itself seriously, it adopted the square brackets,
 but when WordPress started to take itself seriously, it adopted lawyers.

 As for the discussions, it's funny how everyone in the appointed ones
 opposed the use of `array()`, but their voices weren't heard. WordPress is
 not a community but an asset.

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


More information about the wp-trac mailing list