3v4l.org

run code in 300+ PHP versions simultaneously
<?php function getAvailableSubscriptionEndYears() { $currentYear = intval(date_create()->format('Y')); $availableYears = array($currentYear => $currentYear); for($i=1;$i<10;$i++) { var_dump('x'); $nextYear = $currentYear+$i; $availableYears[$nextYear] = $nextYear; } return $availableYears; } var_dump(getAvailableSubscriptionEndYears()); ?>
Output for git.master, git.master_jit, rfc.property-hooks
string(1) "x" string(1) "x" string(1) "x" string(1) "x" string(1) "x" string(1) "x" string(1) "x" string(1) "x" string(1) "x" array(10) { [2015]=> int(2015) [2016]=> int(2016) [2017]=> int(2017) [2018]=> int(2018) [2019]=> int(2019) [2020]=> int(2020) [2021]=> int(2021) [2022]=> int(2022) [2023]=> int(2023) [2024]=> int(2024) }

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
52.37 ms | 402 KiB | 8 Q