3v4l.org

run code in 300+ PHP versions simultaneously
<?php $var=300; $int_options = array( "options"=>array ( "min_range"=>0, "max_range"=>256 ) ); if(!filter_var($var, FILTER_VALIDATE_INT, $int_options)) { echo("Integer is not valid"); } else { echo("Integer is valid"); } ?>

preferences:
35.45 ms | 402 KiB | 5 Q