3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $file = 'example.txt'; $newfile = 'example.txt.bak'; if (!copy($file, $newfile)) { echo "failed to copy $file...\n"; }
Output for 4.3.2 - 5.6.28, 7.0.0 - 7.1.0
Warning: copy(example.txt): failed to open stream: No such file or directory in /in/IvsWW on line 5 failed to copy example.txt...
Output for hhvm-3.10.0 - 3.12.0
failed to copy example.txt...
Output for 4.3.0 - 4.3.1
Warning: copy(example.txt) [http://www.php.net/function.copy]: failed to create stream: No such file or directory in /in/IvsWW on line 5 failed to copy example.txt...