On 3/7/2012 8:48 PM, John Crenshaw wrote:
In fact, nearly every input to PHP is a string. This is why PHP was
designed with some seriously robust type juggling on scalars. Any
typing proposal that wants to actually pass a vote is going to have
to allow appropriate implicit conversions from string to other
types.
In fact, nearly every output from PHP is a string. Also why PHP was designed with some seriously robust type juggling on scalars. Any typing proposal that wants to actually pass a vote is going to have to allow appropriate implicit conversions to string from other types.
$x = 1.8;
$y = 2.3;
list( $int, $fract ) = explode( '.', $x + $y );