fork(1) download
  1. <?php
  2. define('FOO', 'bar');
  3.  
  4. $constant = function ($nome) {
  5. return $nome;
  6. };
  7.  
  8. echo "FOO = {$constant(FOO)}\n",
  9. "BAZ = {$constant(BAZ)}\n",
  10. "PHP_VERSION = {$constant(PHP_VERSION)}\n";
Success #stdin #stdout #stderr 0.02s 82560KB
stdin
Standard input is empty
stdout
FOO = bar
BAZ = BAZ
PHP_VERSION = 7.1.1-1
stderr
PHP Notice:  Use of undefined constant BAZ - assumed 'BAZ' in /home/2HfV61/prog.php on line 9