Laravel [] indicates an array. how can this be done?

Source: Internet
Author: User
No php syntax. no php syntax.

Reply content:

Php syntax does not exist.

New features after PHP5.4

The manual is the best teacher!

$ Arr = [];

You can define an array. The syntax is correct.

The features of various PHP5 versions are all syntaxes supported several years ago, but they are rarely used by everyone.

Before PHP5.2: autoload, PDO and MySQLi, type constraints
PHP5.2: JSON support
PHP5.3: deprecated functions, anonymous functions, new magic methods, namespaces, static binding later, Heredoc and Nowdoc, const, ternary operators, Phar
PHP5.4: Short Open Tag, abbreviated array format, Traits, built-in Web server, detailed modification
PHP5.5: yield, list () for foreach, details modification
PHP5.6: constant enhancement, variable function parameters, and namespace enhancement

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.