Home  >  Article  >  Backend Development  >  laravel [] represents an array, how is this done?

laravel [] represents an array, how is this done?

WBOY
WBOYOriginal
2016-08-04 09:21:39883browse

There is no PHP syntax itself

Reply content:

There is no PHP syntax itself

New features after PHP5.4
laravel [] represents an array, how is this done?

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

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn