3v4l.org

run code in 300+ PHP versions simultaneously
<?php $options = [ 'default' => 0, 'min_range' => 0, 'max_range' => 999, ]; $id = filter_input(INPUT_GET, 'id', FILTER_SANITIZE_NUMBER_INT, ['options' => $options]); $link = sprintf('https://www.stronka.pl/index.php?id=%d', $id); echo '<a href="'. $link .'"><img src="https://www.stronka.pl/button.png"></a>';
Output for 8.1.0 - 8.1.29, 8.2.0 - 8.2.20, 8.3.0 - 8.3.8
<a href="https://www.stronka.pl/index.php?id=0"><img src="https://www.stronka.pl/button.png"></a>

preferences:
89.75 ms | 402 KiB | 65 Q