- var_dump: documentation ( source)
- date: documentation ( source)
- strtotime: documentation ( source)
<?php
$input = array( 'last day of this month',
'Last day of this month',
'lAst Day of This Month');
foreach ($input as $str)
{
var_dump(date('Y-m-d', strtotime($str)));
}