3v4l.org

run code in 200+ PHP versions simultaneously
<?php $count = '999'; $count = filter_var($count, FILTER_VALIDATE_INT, [20, 1, 20]); var_dump($count); if (!$count) { $count = 20; }
based on WApju
Output for 7.1.25 - 7.4.0rc4
int(999)