3v4l.org

run code in 300+ PHP versions simultaneously
<?php $input = <<<EOL A B C D One Two Three Four 100 2000 30000 400000 EOL; $handle = tmpfile(); fwrite($handle, $input); rewind($handle); echo '<table width="400" border="1">'; while (($transArry = fgetcsv($handle, 1000, ' ', escape: ' ')) !== false) { vprintf( "\n\t<tr><td>%s %s</td><td>%s</td><td>%s</td></tr>", $transArry ); } fclose($handle); echo "\n</table>";
Output for 8.2.0 - 8.2.29, 8.3.0 - 8.3.28, 8.4.1 - 8.4.14, 8.5.0
<table width="400" border="1"> <tr><td>A B</td><td>C</td><td>D</td></tr> <tr><td>One Two</td><td>Three</td><td>Four</td></tr> <tr><td>100 2000</td><td>30000</td><td>400000</td></tr> </table>
Output for 8.4.15
/bin/php-8.4.15: /usr/lib/libm.so.6: version `GLIBC_2.38' not found (required by /bin/php-8.4.15) /bin/php-8.4.15: /usr/lib/libm.so.6: version `GLIBC_2.35' not found (required by /bin/php-8.4.15) /bin/php-8.4.15: /usr/lib/libc.so.6: version `GLIBC_2.34' not found (required by /bin/php-8.4.15) /bin/php-8.4.15: /usr/lib/libc.so.6: version `GLIBC_2.38' not found (required by /bin/php-8.4.15)
Process exited with code 1.

preferences:
85.6 ms | 407 KiB | 5 Q