3v4l.org

run code in 200+ PHP versions simultaneously
<?php var_dump(filter_var('03', FILTER_VALIDATE_INT)); var_dump(filter_var('+08', FILTER_VALIDATE_INT)); var_dump(filter_var('-010', FILTER_VALIDATE_INT)); var_dump(filter_var('03', FILTER_VALIDATE_FLOAT)); var_dump(filter_var('+08', FILTER_VALIDATE_FLOAT)); var_dump(filter_var('-010', FILTER_VALIDATE_FLOAT));
based on LMY87
Output for 5.6.0 - 7.2.6
bool(false) bool(false) bool(false) float(3) float(8) float(-10)