3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $arValues = array( 6 => 'hello', 2 => 'world', 5 => 'something' ); $arValues = array_reverse($arValues); $val = array_pop($arValues); $arValues = array_reverse($arValues); var_dump( $val, $arValues);
Output for 4.3.0 - 7.1.0
string(5) "hello" array(2) { [0]=> string(5) "world" [1]=> string(9) "something" }