|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2010-07-03 17:14 UTC] hrach dot cz at gmail dot com
Description:
------------
If I use diff method (doesn't matter on which variable),
usually (unfortunatelly not allways) round function returned some char (@, U, :, <, ...)
I was not able to realize cases. :(
Test script:
---------------
<?php
$t = new DateTime();
$s = new DateTime('2010-08-01');
$diff = $t->diff($s, true)->format('%d');
echo $diff ."\n";
$var = 98232923;
$mod = 82342;
$dur = round($var / $mod);
echo $dur;
Expected result:
----------------
2
1193
Actual result:
--------------
2
Ů
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Nov 06 05:00:01 2025 UTC |
I copied old version of definition $t, should be: $t = new DateTime('2010-08-03');