3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php var_dump( (string) true, filter_var(true, FILTER_VALIDATE_INT), (string) false, filter_var(false, FILTER_VALIDATE_INT), (string) 1.1, filter_var(1.1, FILTER_VALIDATE_INT), (string) 0.0, filter_var(0.0, FILTER_VALIDATE_INT), (string) '0.0nb', filter_var('0.0', FILTER_VALIDATE_INT), (string) '-0.0', filter_var('-0.0', FILTER_VALIDATE_INT) );
based on CZW0W
Output for 5.6.0 - 5.6.30, hhvm-3.15.4, 7.0.0 - 7.2.0
string(1) "1" int(1) string(0) "" bool(false) string(3) "1.1" bool(false) string(1) "0" int(0) string(5) "0.0nb" bool(false) string(4) "-0.0" bool(false)