3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $l = array('one', 'two', 'three'); $last = end($l); print $last . "\n"; foreach ($l as $element) { print $element . "\n"; }
based on kKUBK
Output for 4.3.0 - 7.1.0
three one two three