3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a_date = "2009-11-23"; echo date("Y-m-t", strtotime($a_date)); echo (new DateTime('2010-01-19')) ->modify('first day of this month') ->format('jS, F Y');

preferences:
80.1 ms | 402 KiB | 5 Q