Home >Backend Development >PHP Tutorial >laravel [] represents an array, how is this done?
There is no PHP syntax itself
There is no PHP syntax itself
New features after PHP5.4
The manual is the best teacher!
<code>$arr = [];</code>
You can define an array by itself, there is no syntax problem
Please provide the features of each version of PHP5. They are all syntaxes that were supported several years ago, but they are rarely used by everyone.
PHP5.2 before: autoload, PDO and MySQLi, type constraints
PHP5.2: JSON support
PHP5.3: deprecated features, anonymous functions, new magic methods, namespaces, late static binding, Heredoc and Nowdoc , const, ternary operator, Phar
PHP5.4: Short Open Tag, array abbreviation, Traits, built-in Web server, details modified
PHP5.5: yield, list() for foreach, details modified
PHP5.6 : Constant enhancement, variable function parameters, namespace enhancement