3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo $this_year = date("Y", strtotime("-6 month")); echo $this_year - 1; ?>

preferences:
48.05 ms | 402 KiB | 5 Q