Mega Code Archive

 
Categories / Php / Language Basics
 

Create a reference to a variable with the name of the constants value

<?php  define('CONST_A', 'test');  ${CONST_A} = 27;  echo "\$test = $test\n";  ?>