3v4l.org

run code in 300+ PHP versions simultaneously
<?php $date = "2016-01-30"; $date = date('Y-m-d', strtotime("last day of next month",strtotime($date))); echo $date;

preferences:
114.02 ms | 405 KiB | 5 Q