3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php constant('__DIR__', 'yay'); var_dump(__DIR__);
Output for 5.3.0 - 7.1.0
Warning: constant() expects exactly 1 parameter, 2 given in /in/Sce24 on line 3 string(3) "/in"
Output for 4.3.0 - 5.2.17
Warning: Wrong parameter count for constant() in /in/Sce24 on line 3 Notice: Use of undefined constant __DIR__ - assumed '__DIR__' in /in/Sce24 on line 4 string(7) "__DIR__"