DEV Community

Discussion on: I Want Scalar Objects in PHP

 
drewknab profile image
Drew Knab

Yep, and it would just require an extra step sometimes to explicitly cast to the desired type. We have to do this in PHP/JS sometimes now as it is.

Thread Thread
 
pkristiancz profile image
Patrik Kristian

It could be usable tho... i imagine this:

$array = ((string) $float)->explode(.);