PHP 7 – Constant Arrays

In PHP 7, another feature has been included called constant arrays. Constant arrays() in php 7 is defined by define function.

<?php
   //define a array using define function
   define('languages', [
      'Python',
      'PHP',
      'C'
   ]);
   print(languages[1]);
?>

Output: PHP
Wordpress Social Share Plugin powered by Ultimatelysocial
Wordpress Social Share Plugin powered by Ultimatelysocial