Benchmark it, but from what I can find this is dated advice. It might be faster on first load but it'd surprise me if it's always faster.
Edit: looking into how PHP has evolved, 8 added a JIT in 2021. That will almost certainly make it faster to use a class rather than an associative array. Associative arrays are very hard for a JIT to look through and optimize around.
Benchmark it, but from what I can find this is dated advice. It might be faster on first load but it'd surprise me if it's always faster.
Edit: looking into how PHP has evolved, 8 added a JIT in 2021. That will almost certainly make it faster to use a class rather than an associative array. Associative arrays are very hard for a JIT to look through and optimize around.