- var_dump: documentation ( source)
- strtotime: documentation ( source)
<?php
$time = array(
false,
'sdfasas',
'0000-00-00',
'0000-00-00 00:00:00',
'1231231',
'bkasfkf'
);
foreach($time as $s) {
$iStartTime = ((strtotime($s) >= 0) ? strtotime($s) : 0);
var_dump($iStartTime);
}