3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo new \MongoDate(strtotime("first day of " . $month . " " . $year));

preferences:
69.9 ms | 402 KiB | 5 Q