3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php // Ensure that PHP's magic constant __DIR__ is defined - no matter of the PHP version. // If magic __DIR__ constant is not defined, define it. (@__DIR__ == '__DIR__') && define('__DIR__', dirname(__FILE__)); // All PHP versions (>= 4.3.1) can use the magic __DIR__ constant now.. // Demo (outputs and VLD opcodes) here: http://3v4l.org/bm6e1 ?>
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0