3v4l.org

run code in 300+ PHP versions simultaneously
<?php function GetMonthFromMySQLString($mysql_datetime) { return date('Y-m', strtotime($mysql_datetime)); } echo GetMonthFromMySQLString("2011-01-26 18:29:09");

preferences:
35.53 ms | 402 KiB | 5 Q