Post By Sven (59892) has to be changed
$array = array('first'=>'111', 'second'=>'222', 'third'=>'333');
$rarray = array_keys($array);
print array_shift($rarray); // first
print array_pop($rarray); //thrid
print array_shift($rarray); //second
print array_pop($rarray); // no result
Code below is not valid from 5.4.0
print array_shift(array_keys($array)); Throws Strict Standards Error
Sven code works fine till 5.3.29. From 5.4.0 the standards have been changed and results too differ.
Note :
Strict Standards : Only variables should be passed by reference
Please have look of the code in different versions
http://sandbox.onlinephpfunctions.com/code/24b5fddf14b635f1e37db69a7edffc2cbbed55e1
http://sandbox.onlinephpfunctions.com/code/f695e8f81e906b4f062b66cf9b3b83b6b620464c