PHP 7 – Constant Arrays

PHP 7 – Constant Arrays

In PHP 7, a new feature, spaceship operator has been introduced. Array constants can now be defined using the define() function. In PHP 5.6, they could only be defined using const keyword.

//define a array using define function
define('animals', [


It produces the following browser output -




Thank You for visit Design & Develop by Abdur Rahaman