On this page
HTTP & JSON
jsonArrayShift
$jsonArrayShift[]
Removes and returns the first item from a JSON array, shifting all other elements down by one index.
Syntax
$jsonArrayShift[key]
$jsonArrayShift removes and returns the first element from a JSON array — equivalent to JavaScript’s Array.shift(). This is ideal for FIFO (First In, First Out) queue processing. All remaining elements shift down by one index. Shifting from an empty array returns an empty string.