3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $int = 20060627; $typehint = function ($int): float { return $int * 10; }; $class = new class { function float($num): float { return $num * 10; } }; class Foo { public function getW($val): float { return $val * 10; } } var_dump(json_encode([(float)$int, $typehint($int), $class->float($int), (new Foo)->getW($int)])); echo floatval($int), PHP_EOL, $typehint($int);
Output for 7.2.11
string(40) "[20060627,200606270,200606270,200606270]" 20060627 200606270