News for hackers. Stuff that matters.
Re:What's new in PHP 8? by searchableguy on Friday August 14, 2020 @10:14AM (#24158213)
Are there real use cases for type coercion?
Re:What's new in PHP 8? by shawnz on Friday August 14, 2020 @10:56AM (#24158720)
For example, it is helpful to avoid having to do tons of explicit integer parsing when working with the DOM, which uses strings for everything
Re:What's new in PHP 8? by occamrazor on Friday August 14, 2020 @01:30PM (#24160723)
Yes. You have a list of floats and you want to add n to the n-th element. Then n is both an integer (when indexing the list) and a float (when adding).

Of course the language can require an explicit cast, but in most cases it goes against the intuitiveness and simplicity that dynamic languages want to achieve.