3v4l.org

run code in 300+ PHP versions simultaneously
<?php $handle = fopen('file', 'w+'); // truncate + attempt to create fwrite($handle, '12345'); // file position > 0 rewind($handle); // position = 0 $content = stream_get_contents($handle); // file position = 0 in PHP 5.1.6, file position > 0 in PHP 5.2.17! fwrite($handle, '6789'); fclose($handle);
Output for git.master_jit, git.master, rfc.property-hooks
Warning: fopen(): open_basedir restriction in effect. File(file) is not within the allowed path(s): (/tmp:/in:/etc) in /in/jGpu6 on line 2 Warning: fopen(file): Failed to open stream: Operation not permitted in /in/jGpu6 on line 2 Fatal error: Uncaught TypeError: fwrite(): Argument #1 ($stream) must be of type resource, false given in /in/jGpu6:3 Stack trace: #0 /in/jGpu6(3): fwrite(false, '12345') #1 {main} thrown in /in/jGpu6 on line 3
Process exited with code 255.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
45.51 ms | 402 KiB | 8 Q