Simple fun task


1 reply [Last post]
Yaremchuk
Offline
Joined: 04/20/2010

<?php
$foo = '3.5 kg';
$bar = (float)$foo; // 3.5
$bar = (int)$foo; // 3
$baz = (string)$foo; // '3.5 kg'

print $bar + $baz; // 6
print $bar . $baz; // '33'
?>

why 6 & 33?