3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $data['ealkalom'] = '2014. 04. 30. 00:00'; $data['valkalom'] = '2014. 04. 30. 00:00'; print date('H', strtotime($data['ealkalom']))."<br/>"; print date('H', strtotime($data['valkalom'])); if(preg_match("/(2[0-3]|[01][0-9]):[0-5][0-9]/", $data['ealkalom'])) { print "ok"; } if(date('H', strtotime($data['ealkalom'])) == "00" or date('H', strtotime($data['valkalom'])) == "00") { $dateType = "Y. m. d."; } else { $dateType = "Y. m. d. H:i"; } print $data['ealkalom'] = date($dateType, $data['ealkalom']); print $data['valkalom'] = date($dateType, $data['valkalom']);
Output for 5.1.0 - 5.6.28, hhvm-3.12.0, 7.0.0 - 7.1.0
01<br/>01ok Notice: A non well formed numeric value encountered in /in/9tcCg on line 17 1970. 01. 01. 01:33 Notice: A non well formed numeric value encountered in /in/9tcCg on line 18 1970. 01. 01. 01:33
Output for hhvm-3.10.0
01<br/>01ok1970. 01. 01. 01:331970. 01. 01. 01:33
Output for 4.3.0 - 5.0.5
00<br/>00ok1970. 01. 01.1970. 01. 01.