Coding Fundamentals Pop and Shift Arrays With PHP: When to Use Each One Tutorial • Beginner In this quick tip, I'll show you how to use the array_pop() and array_shift() functions in PHP to get the first and last elements of an array.