3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $time = mktime(23, 59, 59, 09, 06, 2013); $format1 = "%I:%M %p"; $format2 = "%I:%M %P"; assert(strftime($format1, $time) === '11:59 PM'); // as documented on php.net/strftime, %p => PM assert(strftime($format2, $time) === '11:59 pm'); // and %P => pm assert(strptime($format1, '11:59 PM') !== false); assert(strptime($format2, '11:59 pm') !== false); assert(strptime($format1, '11:59 pm') === false); assert(strptime($format2, '11:59 PM') === false);
Output for 5.1.0 - 5.6.28, hhvm-3.12.0
Warning: assert(): Assertion failed in /in/9sDWp on line 10 Warning: assert(): Assertion failed in /in/9sDWp on line 11
Output for hhvm-3.10.0
Output for 5.0.0 - 5.0.5
Fatal error: Call to undefined function strptime() in /in/9sDWp on line 10
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: strptime() in /in/9sDWp on line 10
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: strptime() in /in/9sDWp on line 10
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: strptime() in /in/9sDWp on line 10