3v4l.org

run code in 300+ PHP versions simultaneously
<?php function fdopen($id, $mode) { return fopen("/proc/self/fd/".(int)$id, $mode); } echo file_get_contents("php://fd/2");
Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.7
Notice: file_get_contents(): Read of 8192 bytes failed with errno=9 Bad file descriptor in /in/jcRKM on line 8
Output for 7.4.0 - 7.4.33
Notice: file_get_contents(): read of 8192 bytes failed with errno=9 Bad file descriptor in /in/jcRKM on line 8
Output for 7.0.0 - 7.0.20, 7.1.0 - 7.1.20, 7.2.0 - 7.2.33, 7.3.16 - 7.3.33

preferences:
130.62 ms | 402 KiB | 174 Q