3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php file_put_contents('A.php', '<?php class A{}'); include 'A.php'; $a = new A(); var_dump($a);
Output for 7.0.0 - 7.2.9
Warning: file_put_contents(): open_basedir restriction in effect. File(A.php) is not within the allowed path(s): (/tmp:/in:/etc) in /in/MLAXP on line 3 Warning: file_put_contents(A.php): failed to open stream: Operation not permitted in /in/MLAXP on line 3 Warning: include(): open_basedir restriction in effect. File(A.php) is not within the allowed path(s): (/tmp:/in:/etc) in /in/MLAXP on line 4 Warning: include(A.php): failed to open stream: Operation not permitted in /in/MLAXP on line 4 Warning: include(): Failed opening 'A.php' for inclusion (include_path='.:') in /in/MLAXP on line 4 Fatal error: Uncaught Error: Class 'A' not found in /in/MLAXP:5 Stack trace: #0 {main} thrown in /in/MLAXP on line 5
Process exited with code 255.
Output for hhvm-3.22.0
Warning: Permission denied in /in/MLAXP on line -1 Warning: include(A.php): File not found in /in/MLAXP on line -1 Fatal error: Uncaught Error: Class undefined: A in /in/MLAXP:-1 Stack trace: #0 {main}
Process exited with code 255.
Output for hhvm-3.15.4 - 3.21.3
Warning: Permission denied in /in/MLAXP on line 3 Warning: include(A.php): File not found in /in/MLAXP on line 4 Fatal error: Uncaught Error: Class undefined: A in /in/MLAXP:5 Stack trace: #0 {main}
Process exited with code 255.
Output for 5.6.30
Warning: file_put_contents(): open_basedir restriction in effect. File(A.php) is not within the allowed path(s): (/tmp:/in:/etc) in /in/MLAXP on line 3 Warning: file_put_contents(A.php): failed to open stream: Operation not permitted in /in/MLAXP on line 3 Warning: include(): open_basedir restriction in effect. File(A.php) is not within the allowed path(s): (/tmp:/in:/etc) in /in/MLAXP on line 4 Warning: include(A.php): failed to open stream: Operation not permitted in /in/MLAXP on line 4 Warning: include(): Failed opening 'A.php' for inclusion (include_path='.:') in /in/MLAXP on line 4 Fatal error: Class 'A' not found in /in/MLAXP on line 5
Process exited with code 255.