3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $f = fopen('/test.txt', 'w'); fwrite($f, "f"); ?>
Output for 7.3.0rc3
Warning: fopen(): open_basedir restriction in effect. File(/test.txt) is not within the allowed path(s): (/tmp:/in:/etc) in /in/eZEre on line 2 Warning: fopen(/test.txt): failed to open stream: Operation not permitted in /in/eZEre on line 2 Warning: fwrite() expects parameter 1 to be resource, bool given in /in/eZEre on line 3
Output for 7.3.0alpha1 - 7.3.0beta2
Warning: fopen(/test.txt): failed to open stream: Permission denied in /in/eZEre on line 2 Warning: fwrite() expects parameter 1 to be resource, bool given in /in/eZEre on line 3
Output for 5.6.30, 7.0.0 - 7.2.9
Warning: fopen(): open_basedir restriction in effect. File(/test.txt) is not within the allowed path(s): (/tmp:/in:/etc) in /in/eZEre on line 2 Warning: fopen(/test.txt): failed to open stream: Operation not permitted in /in/eZEre on line 2 Warning: fwrite() expects parameter 1 to be resource, boolean given in /in/eZEre on line 3
Output for hhvm-3.22.0
Warning: Permission denied in /in/eZEre on line -1 Warning: fwrite() expects parameter 1 to be resource, boolean given in /in/eZEre on line -1
Output for hhvm-3.15.4 - 3.21.3
Warning: Permission denied in /in/eZEre on line 2 Warning: fwrite() expects parameter 1 to be resource, boolean given in /in/eZEre on line 3