Is PHP good for data structures and algorithms?
For learning them, yes, once you drop one habit: reaching for an array for everything. PHP's array is flexible enough to be a list, a dictionary and a stack, which is exactly what hides the cost of each operation. Build the structures yourself and PHP is a perfectly good language to reason about algorithms in, and the natural one to interview in if PHP is your job.
Which SPL classes match which data structures?
SplStack and SplQueue are a stack and a queue, both built on SplDoublyLinkedList; SplMinHeap and SplMaxHeap are heaps; SplPriorityQueue is a max-heap ordered by priority; and SplFixedArray is a fixed-size array with integer indexes that uses less memory than an array. The plain array is your hash table. There is no tree, trie or graph class, so those you write yourself, in steps one and two.
Why is array_shift slow for a queue in PHP?
Because after removing the first element it renumbers every remaining integer key from zero, which touches the whole array: a queue built on array_shift costs O(n) per dequeue, and quadratic time to empty. Use SplQueue, or keep a head index into the array and advance it instead. Step one has you build a queue yourself, which is the surest way to see the difference.
Is sort() stable in PHP?
Since PHP 8.0, yes: sort(), usort(), asort() and the other sorting functions keep equal elements in their original order. Before 8.0 they made no such promise, so code that depended on the order of equal elements could behave differently between versions. Of the eight sorts in step three, merge sort and insertion sort are stable and quicksort and heap sort are not; after it, you know why.
Which courses on this path are not taught in PHP?
Three: dynamic programming and the Python interview series, taught in Python, and bit manipulation, taught in C++. They are listed after the steps, each with a link that opens it in its own language. A memo table in PHP is an array keyed by the subproblem. One trap when porting bit tricks: if both operands of &, | or ^ are strings, PHP works on their characters' byte values and returns a string, so make sure the values are integers first.
Do I need to know PHP before starting this path?
Functions, arrays, loops and classes, at least, since a node is naturally an object with a $next property. If those are new, Coddy's PHP course takes you there first, free, and this path picks up where it ends.