3v4l.org

run code in 300+ PHP versions simultaneously
<?php $val_str = "1008901020901566350119"; $int = "1"; $string = "12345"; $data = array("val_str" => $val_str, "int" => (int)$int, "string" => $string); var_dump(json_encode($data));
Output for 7.2.0 - 7.2.33, 7.3.0 - 7.3.26, 7.4.0 - 7.4.13, 8.0.0
string(61) "{"val_str":"1008901020901566350119","int":1,"string":"12345"}"