3v4l.org

run code in 300+ PHP versions simultaneously
<?php $today_day = 28; $day = date("d-m-Y", mktime(0,0,0,2, $today_day,date("Y"))); $firstday=$day; print_r(explode("-",$firstday)); echo "firstday=$firstday\n"; echo "m=".date("m", strtotime($firstday)) . " | Y=" . date("Y", strtotime($firstday))."\n"; echo $day ."\n"; $today_day++; $day = date("d-m-Y", mktime(0,0,0,date("m", strtotime($firstday)),$today_day,date("Y", strtotime($firstday)))); echo "m=".date("m", strtotime($firstday)) . " | Y=" . date("Y", strtotime($firstday))."\n"; echo $day ."\n"; $today_day++; $day = date("d-m-Y", mktime(0,0,0,date("m", strtotime($firstday)),$today_day,date("Y", strtotime($firstday)))); echo $day ."\n"; ?>

preferences:
41.66 ms | 402 KiB | 5 Q