3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ 'first','second','third' ]; $firstKey = current(array_keys($array)); # get first array key foreach ($array as $key => $value) { echo ($key !== $firstKey ? ', ' : ''). $value; }

preferences:
85.13 ms | 405 KiB | 5 Q