PHP 7 Constant Arrays

To define Array constants we used define() In PHP 7.In PHP 5.6, they could only be defined with const.

<?php
//define a array using define in PHP 7
   define('web', [
      'js',
      'json',
      'ajax'
   ]);
   print(web[1]);
?>

OutPut

The above example will output: json