3v4l.org

run code in 300+ PHP versions simultaneously
<?php date_default_timezone_set('Europe/Prague'); $time = 1400066464.341456; $micro_time = sprintf("%06d", ($time - floor($time)) * 1000000); $date = new DateTime(date('Y-m-d H:i:s.' . $micro_time, $time)); echo $date->format("Y-m-d H:i:s.u") . " - OK\n"; setlocale(LC_NUMERIC, 'cs_CZ.utf8'); $date = new DateTime(date('Y-m-d H:i:s.' . $micro_time, $time)); echo $date->format("Y-m-d H:i:s.u") . " - BAD!\n";
Output for git.master, git.master_jit, rfc.property-hooks
Deprecated: Implicit conversion from float 1400066464.341456 to int loses precision in /in/t686l on line 9 2014-05-14 13:21:04.341455 - OK Deprecated: Implicit conversion from float 1400066464.341456 to int loses precision in /in/t686l on line 14 2014-05-14 13:21:04.341455 - BAD!

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
37.86 ms | 401 KiB | 8 Q