3v4l.org

run code in 200+ PHP versions simultaneously
<?php $s = '43'; $i = 42; var_dump(gettype($s)); var_dump(gettype($i)); // changing... $s = (int)$s; $i = (string)$s; var_dump(gettype($s)); var_dump(gettype($i));
Output for 7.1.25 - 7.3.0
string(6) "string" string(7) "integer" string(7) "integer" string(6) "string"