I found this "modern" version of defining an array in the sources of laravel 5. Are there any advantages of doing it this way?
// the traditional way
$arrEmpty = array();
$arrFilled = array(
'a' => 'apple'
);
// the 'modern' way
$arrEmpty = [];
$arrFilled = [
'a' => 'apple'
];
The 'new' way does not seem to be standard, so I couldn't use this one on PHP 5.3. Any doc-links are welcome.
laravel. It isPHP.