arrays - php - array_reverse efficiency -


i read on php site (http://php.net/manual/en/function.array-shift.php) use of array_reverse , array_pop more efficient using array_shift.

i wondering, array_reverse, more efficient if $preserve_keys parameter set true? seems redoing keys, necessary iteration, wasn't sure whether same iteration necessary preserve keys , reverse array.

my primary question is: array_reverse(array_pop(array_reverse($arr, true)),true) more efficient array_shift($arr), , if so, how array_reverse avoid iteration required array_shift?


Comments

Popular posts from this blog

searchKeyword not working in AngularJS filter -

sequelize.js - Sequelize: sort by enum cases -

user interface - how to replace an ongoing process of image capture from another process call over the same ImageLabel in python's GUI TKinter -