Why Wordpress Prefer array() Instead of Short Array Syntax

Short array syntax [] was introduced a while back when PHP 5.4 was released. Basically it is ability to define arrays using [] instead of array(). 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 <?php $arr1 = array( 'motto' => 'learning is fun.', 'url' => 'raisachin.com.np' ); $arr2 = [ 'motto' => 'learning is fun.', 'url' => 'raisachin.com.np' ]; echo '<pre>'; print_r($arr1); echo '</pre>'; Using any of the above will result the same output....

July 31, 2021 · 1 min · Me

Hello World

July 31, 2021 · 0 min · Me