3v4l.org

run code in 500+ PHP versions simultaneously
<?php $handle = fopen("/Users/ssarwe/Downloads/clientsToSet.txt", "r") or die("Couldn't get handle"); if ($handle) { while (!feof($handle)) { $buffer = fgets($handle, 4096); echo $buffer.PHP_EOL; } fclose($handle); }
Output for 8.5.0 - 8.5.7
Warning: fopen(/Users/ssarwe/Downloads/clientsToSet.txt): Failed to open stream: No such file or directory in /in/oGqOd on line 2 Couldn't get handle
Output for 8.2.31, 8.3.0 - 8.3.31, 8.4.1 - 8.4.22
Warning: fopen(): open_basedir restriction in effect. File(/Users/ssarwe/Downloads/clientsToSet.txt) is not within the allowed path(s): (/tmp:/in:/etc) in /in/oGqOd on line 2 Warning: fopen(/Users/ssarwe/Downloads/clientsToSet.txt): Failed to open stream: Operation not permitted in /in/oGqOd on line 2 Couldn't get handle

preferences:
48.66 ms | 767 KiB | 4 Q