3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $str = pi(); $a = strval($str); $b = (string)$str; $c = "$str"; var_dump($a); var_dump($b); var_dump($c); echo gettype(M_PI);
based on qH4iH
Output for 4.3.0 - 7.2.0
string(15) "3.1415926535898" string(15) "3.1415926535898" string(15) "3.1415926535898" double