3v4l.org
- online PHP shell, test in 80+ different PHP versions!
<?php $arr = array( 0 => array('foo' => '1','bar' => 'A'), 1 => array('foo' => '2','bar' => 'B'), 2 => array('foo' => '3','bar' => 'C')); $foo = array_map('array_shift', $arr); $bar = array_map('array_pop', $arr); var_dump($foo,$bar);
Output
VLD opcodes
Performance
References
Output for 4.3.0 - 5.4.9
array(3) { [0]=> string(1) "1" [1]=> string(1) "2" [2]=> string(1) "3" } array(3) { [0]=> string(1) "A" [1]=> string(1) "B" [2]=> string(1) "C" }
Follow us on Twitter