PHP types for kids ... part 2: tell PHP exactly what you want (scalar casts)
Let PHP guess, and it will guess wrong. Part 2 of the series: explicit casts (int), (string), (float), (bool), declare(strict_types=1) and the cast-at-boundary pattern that saves CPU in loops.
Read article →