3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $filename1 = "\x41\x6d\xC3\xA9\x6c\x69\x65"; $filename2 = "\x41\x6d\x65\xCC\x81\x6c\x69\x65"; file_put_contents($filename1, "Hello\n"); echo file_get_contents($filename2); $files = glob("Am*"); echo "There are ".count($files)."files\n"; foreach ($files as $fileOnDisk) { echo "strcmp val ".strcmp($filename1, $fileOnDisk)."\n"; echo "strcmp val ".strcmp($filename2, $fileOnDisk)."\n"; } exit(0);
Output for 5.2.3 - 5.6.25, 7.0.0 - 7.1.0
Warning: file_put_contents(Amélie): failed to open stream: Permission denied in /in/B8u54 on line 7 Warning: file_get_contents(Amélie): failed to open stream: No such file or directory in /in/B8u54 on line 8 There are 0files
Output for hhvm-3.10.0 - 3.12.0
Warning: Permission denied in /in/B8u54 on line 7 Warning: No such file or directory in /in/B8u54 on line 8 There are 0files
Output for 5.0.0 - 5.2.2
Warning: file_put_contents(Amélie): failed to open stream: Read-only file system in /in/B8u54 on line 7 Warning: file_get_contents(Amélie): failed to open stream: No such file or directory in /in/B8u54 on line 8 There are 0files
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: file_put_contents() in /in/B8u54 on line 7
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: file_put_contents() in /in/B8u54 on line 7
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: file_put_contents() in /in/B8u54 on line 7