3v4l.org

run code in 300+ PHP versions simultaneously
<?php header('Content-Type: text/plain'); $string = 'abcdefg'; echo "4th char is '$string[3]'"; foreach ($string as $char) { echo "$char\n"; }

preferences:
33.8 ms | 402 KiB | 5 Q