3v4l.org

run code in 300+ PHP versions simultaneously
<?php $currentmonth = date('m');//good one $montharray=array('Jan', 'Feb', 'Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov', 'Dec'); $month = 0; for ($int=0; $int<$currentmonth-1; $int++) { $mth=$montharray[$int]; echo $mth; }

preferences:
43 ms | 402 KiB | 5 Q