This guide will allow you to use value objects in PHP without a special$obj->equals() method. Instead, you can use the=== or == operator to compare two value objects. This guide will also show you how to use a WeakMap to ensure that you don’tcreate multiple instances of the same value object and how to hack…
If you’ve ever tried to use an array as a queue or stack (via array_pop, array_push, array_unshift and array_shift), you may have discovered they are slow, particularly array_unshift which requires shifting the entire array. Here are the limits of the awesome PHP array: prepending. Prepending to an array is a very costly operation in PHP,…
I was born on a Wednesday, and for some reason, when my birthday falls on a Wednesday, I always consider it a “special” birthday: a Birthday Day. It’s been a long time since I’ve had a Birthday Day — almost ten years! When I was 12-13 years old, I did some work to discover that…
Stay in the loop with everything you need to know.