3v4l.org

run code in 300+ PHP versions simultaneously
<?php var_dump([ filter_var('1', FILTER_VALIDATE_INT), filter_var('1dfdsfsd', FILTER_VALIDATE_INT), filter_var('1 zemlekop', FILTER_VALIDATE_INT), filter_var('0,5', FILTER_VALIDATE_INT), filter_var('0.5', FILTER_VALIDATE_INT), ]);
Output for 8.1.0 - 8.1.27, 8.2.0 - 8.2.17, 8.3.0 - 8.3.6
array(5) { [0]=> int(1) [1]=> bool(false) [2]=> bool(false) [3]=> bool(false) [4]=> bool(false) }

preferences:
84.07 ms | 402 KiB | 58 Q