3v4l.org

run code in 300+ PHP versions simultaneously
<?php function validateRange(int $number): bool { return $number > 0; } // All outputs are `true`. var_dump(validateRange(' 6 ')); var_dump(validateRange('6.')); var_dump(validateRange('06')); var_dump(validateRange('1e2'));
Output for 8.1.0 - 8.1.29, 8.2.0 - 8.2.21, 8.3.0 - 8.3.9
bool(true) bool(true) bool(true) bool(true)

preferences:
73.31 ms | 402 KiB | 67 Q