3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $x = array('blah', "'", "\'/", 1, 0); foreach ($x as $y) { $invalid = (int)(!is_int($y) || (is_int($y) && $y < 1)); echo "{$invalid} - {$y}\n"; }
Output for 4.3.0 - 7.1.0
1 - blah 1 - ' 1 - \'/ 0 - 1 1 - 0