|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2016-06-07 10:53 UTC] cmb@php.net
-Status: Open
+Status: Not a bug
-Package: *General Issues
+Package: Date/time related
-Assigned To:
+Assigned To: cmb
[2016-06-07 10:53 UTC] cmb@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Nov 07 00:00:02 2025 UTC |
Description: ------------ if you print datetime variable with var_export function it will print extra precision digits with zeros. This behaviour is since version 5.6.x. Test script: --------------- php -r '$d=new DateTime("2016-06-07 12:37:40");var_export($d);echo "\n";' Expected result: ---------------- DateTime::__set_state(array( 'date' => '2016-06-07 12:37:40', 'timezone_type' => 3, 'timezone' => 'Europe/Berlin', )) Actual result: -------------- DateTime::__set_state(array( 'date' => '2016-06-07 12:37:40.000000', 'timezone_type' => 3, 'timezone' => 'Europe/Berlin', ))