3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Titi { public string $valiou; public function getValiou() { return (float) $this->valiou; } } $titi = new Titi(); $titi->valiou = '2.01'; echo (float) $var;
based on MCHQ8
Output for 7.1.25 - 7.3.3
Parse error: syntax error, unexpected 'string' (T_STRING), expecting function (T_FUNCTION) or const (T_CONST) in /in/MkvCJ on line 4
Process exited with code 255.