3v4l.org

run code in 300+ PHP versions simultaneously
<?php $dir = '/tmp/'.uniqid(); mkdir($dir); mkdir($dir.'/Source'); mkdir($dir.'/A'); mkdir($dir.'/B'); mkdir($dir.'/C'); file_put_contents($dir.'/Source/file', 'foo'); file_put_contents($dir.'/A/file', 'bar'); file_put_contents($dir.'/B/file', 'bar'); file_put_contents($dir.'/C/file', 'bar'); $perm_writable = 0777; $perm_not_writable = 0555; chmod($dir.'/A/file', $perm_writable); chmod($dir.'/A', $perm_writable); chmod($dir.'/B/file', $perm_not_writable); chmod($dir.'/B', $perm_writable); chmod($dir.'/C/file', $perm_writable); chmod($dir.'/C', $perm_not_writable); exec('tree '.$dir, $output); print_r($output); var_dump(rename($dir.'/Source/file', $dir.'/A/file')); var_dump(rename($dir.'/Source/file', $dir.'/B/file')); var_dump(rename($dir.'/Source/file', $dir.'/C/file'));
Output for git.master_jit
Warning: exec(): Unable to fork [tree /tmp/54caa8f404331] in /in/7a8hf on line 27 Array ( ) bool(true) Warning: rename(/tmp/54caa8f404331/Source/file,/tmp/54caa8f404331/B/file): No such file or directory in /in/7a8hf on line 31 bool(false) Warning: rename(/tmp/54caa8f404331/Source/file,/tmp/54caa8f404331/C/file): No such file or directory in /in/7a8hf on line 32 bool(false)
Output for git.master
Warning: exec(): Unable to fork [tree /tmp/54caa8f4017e1] in /in/7a8hf on line 27 Array ( ) bool(true) Warning: rename(/tmp/54caa8f4017e1/Source/file,/tmp/54caa8f4017e1/B/file): No such file or directory in /in/7a8hf on line 31 bool(false) Warning: rename(/tmp/54caa8f4017e1/Source/file,/tmp/54caa8f4017e1/C/file): No such file or directory in /in/7a8hf on line 32 bool(false)

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:
44.74 ms | 401 KiB | 7 Q