3v4l.org

run code in 300+ PHP versions simultaneously
<?php $foo = "string"; var_dump($foo); settype($foo, "integer"); var_dump($foo);
Output for 7.0.0 - 7.0.20, 7.1.0 - 7.1.20, 7.2.5 - 7.2.33, 7.3.16 - 7.3.21, 7.4.0 - 7.4.10, 8.0.0alpha1 - beta3
string(6) "string" int(0)