Welcome! Log In Create A New Profile

Advanced

[PHP-DEV] Slow DateTimeZone::getTransitions with no argument

Posted by Andreas Treichel 
Andreas Treichel
[PHP-DEV] Slow DateTimeZone::getTransitions with no argument
August 16, 2017 12:00AM
Hi,

Is the first entry in the return value of
http://php.net/manual/en/datetimezone.gettransitions.php with the
timestamp PHP_INT_MIN / ZEND_LONG_MIN intended?

The difference with no arguments is over 100 times slower on 64 bit systems:

DateTimeZone::getTransitions()
Duration: 0.075577

DateTimeZone::getTransitions(-62135596800)
Duration: 0.000587

https://3v4l.org/8osB8#output

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
Sorry, only registered users may post in this forum.

Click here to login