php-the-right-way
php-the-right-way copied to clipboard
Type casting & arrays
With all that goodies documented, we still have a topic to think about.
Type casting in PHP is horrible and hard (means prone to errors). You shouldn't use that in 2020. Especially when dealing with requests/responses/configs/arrays and other raw data.
Untyped array is a problem also (with all those issets()
nearby).
We came to an easy solution like this
You think the problem is worth describing?
@codeguy Hi there! Care to see the PR?
@zakirullin yes please :)