Sign in Registration
ruen

Declaring arrays with square brackets in PHP

Объявление массивов квадратными скобками в PHP

Version 5.4 of PHP brings many useful new features, including the declaration of arrays in square brackets. Many developers will love this innovation, especially those who are used to short syntax.

Old syntax for declaring arrays:

  $ array = array ();  

New syntax for declaring arrays:

  $ array = [];  

It's up to you to use the short syntax or not when developing your projects, but the new syntax is more convenient.

Comments (0)
For commenting sign in or register.
Оставить заявку

Latest articles

Popular sections

Eqsash (Tools)

Android app - VK LAST USER ID, отучитель от зависимости и т.д.:
Скачать APK

Share this

Subscribe to

YouTube

Books

IT notes - In simple language about the most necessary things (HTML, CSS, JavaScript, PHP, databases, Drupal, Bitrix, SEO, domains, security and more), PDF, 500 p.

Am (Мессенджер)

Общение смайликами со звуком.

Не работает видео? Смотреть в VK

- Download APK-файл (Android);

- Веб-версия (и PWA);

- Page проекта.