Giter VIP home page Giter VIP logo

php-timecop's Introduction

php-timecop Travis CI build status CircleCI build status Wercker build statusBuild status

DESCRIPTION

A PHP extension providing "time travel" and "time freezing" capabilities, inspired by ruby timecop gem.

INSTALL (with package manager)

If you are using macOS, you can install php-timecop with Homebrew .

brew install homebrew/php/php71-timecop

In Fedora, you can install php-timecop from official repository as php-pecl-timecop

sudo dnf install php-pecl-timecop

In RHEL/CentOS, you can install php-timecop from Remi's RPM repository.

sudo yum install http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
sudo yum install yum-utils
sudo yum-config-manager --enable remi-php71
sudo yum install php-pecl-timecop

Otherwise, you can use pecl command to install php-timecop.

pecl install timecop-beta

INSTALL (with phpize)

git clone https://github.com/hnw/php-timecop.git
cd php-timecop
phpize
./configure
make
make install

After install, add these lines to your php.ini .

extension=timecop.so

INSTALL (on Windows, experimental)

You can download the extension DLL from PECL :: Package :: timecop

To install the extension, extract zip and copy php_timecop.dll to the extension directory.

After install, add these lines to your php.ini .

extension=php_timecop.dll

SYSTEM REQUIREMENTS

  • OS: Windows(experimental), Linux, macOS
  • PHP: 5.3.1 - 7.2.x (might work on 5.2.x and 5.3.0, but not tested enough)
  • SAPI: Apache, CLI
    • Other SAPIs are not tested, but there is no SAPI-dependent code.
  • non-ZTS(recommended), ZTS

FEATURES

  • Freeze time to a specific point.
  • Travel back to a specific point in time, but allow time to continue moving forward from there.
  • Scale time by a given scaling factor that will cause time to move at an accelerated pace.
  • Override the following PHP stock functions and methods, which supports freezing or traveling time.
    • time()
    • mktime()
    • gmmktime()
    • date()
    • gmdate()
    • idate()
    • getdate()
    • localtime()
    • strtotime()
    • strftime()
    • gmstrftime()
    • microtime()
    • gettimeofday()
    • unixtojd()
    • DateTime::_construct()
    • DateTime::createFromFormat() (PHP >= 5.3.0)
    • DateTimeImmutable::_construct() (PHP >= 5.5.0)
    • DateTimeImmutable::createFromFormat() (PHP >= 5.5.0)
    • date_create()
    • date_create_from_format() (PHP >= 5.3.0)
    • date_create_immutable() (PHP >= 5.5.0)
    • date_create_immutable_from_format() (PHP >= 5.5.0)
  • Rewrite value of the following global variables when the time has been moved.
    • $_SERVER['REQUEST_TIME']

USAGE

<?php
var_dump(date("Y-m-d")); // todays date
timecop_freeze(0);
var_dump(gmdate("Y-m-d H:i:s")); // string(19) "1970-01-01 00:00:00"
var_dump(strtotime("+100000 sec")); // int(100000)

The difference between timecop_freeze() and timecop_travel()

timecop_freeze() is used to statically mock the concept of now. As your program executes, time() will not change unless you make subsequent calls to timecop_freeze/travel/scale/return. timecop_travel(), on the other hand, computes an offset between what we currently think time() is and the time passed in. It uses this offset to simulate the passage of time. To demonstrate, consider the following code snippets:

<?php
$new_time = mktime(12, 0, 0, 9, 1, 2008);
timecop_freeze($new_time);
sleep(10);
var_dump($new_time == time()); // bool(true)

timecop_return(); // "turn off" php-timecop

timecop_travel($new_time);
sleep(10);
var_dump($new_time == time()); // bool(false)

Timecop Scale

timecop_scale($scaling_factor) make time move at an accelerated pace. With this function, you can emulate long-span integration test and reduce execution time of time-dependent unit test.

<?php
Timecop::freeze(new DateTime("2017-01-01 00:00:00"));
Timecop::scale(50); // time goes x50 faster
usleep(100000); // 100ms
var_dump((new DateTime())->format("c")); // string(25) "2017-01-01T00:00:05+00:00"

CHANGELOG

version 1.2.10(beta), 2017/11/23

  • Fix "double free" bug on PHP 7.2.0 (#32)

version 1.2.8(beta), 2017/7/7

  • Publish on PECL
  • Support Windows (experimental)

version 1.2.6(beta), 2017/7/4

  • Bug fixed: Calling timecop_freeze() on a fast machine sometimes fails to stop the microsecond part of current time.
  • Support PHP 7.2.0+

version 1.2.4(beta), 2017/6/8

  • Fix #18 (Fix date_create_from_format when using | char)
  • Fix timecop_date_create(): The previous version of timecop_date_create("@[unix timestamp]") returns +1 hour time on PHP 5.3.9 - 5.4.7 only during the DST.

version 1.2.3(beta), 2017/1/8

  • Fix timecop_date_create_from_format(): support time travelling
    • Now portions of the generated time not provided in format will be set to the travelled time
    • The previous version is completely same behavior as date_create_from_format().
  • Remove TimecopDateTime::getTimestamp(), TimecopDateTime::setTimestamp() on PHP 5.2.x

version 1.2.2(alpha), 2017/1/4

  • Implement TimecopDateTimeImmutable class and timecop_date_create_immutable(), timecop_date_create_immutable_from_format() functions.
  • Now timecop_date_create_from_format() returns DateTime instance

version 1.2.0(alpha), 2016/12/30

  • Big internal change (without BC break): handle microseconds accurately in time traveling.
  • Now timecop_freeze() and timecop_travel() accepts either DateTimeInterface or int.
    • With DateTimeInterface argument, freezed/traveled time would have fraction of second.
  • Implement timecop_scale(): Make time go faster.
  • Implement Timecop::***() as alias of timecop_***(). (For freeze, travel, return, scale)

version 1.1.3, 2016/12/27

  • Fix crash when non-object passed as 2nd argument of TimecopDateTime::__construct() (Fix #9)'
  • Add CI environment (CentOS, Ubuntu 32-bit, PHP 7.1)

version 1.1.2(alpha), 2016/04/23

  • Fix for stock PHP on Ubuntu

version 1.1.0(alpha), 2016/04/18

  • Support PHP 7.0.x
  • Now new DateTime() always returns DateTime instance
    • The previous version returns TimecopDateTime instance when timecop.func_override=1.
  • Implement timecop_gettimeofday() and timecop_microtime()

version 1.0.6, 2016/04/15

  • Fix #10 (Timecop segfaults when set_error_handler throws an exception)

version 1.0.5, 2013/11/26

  • Fix TimecopDateTime::createFromFormat() to reutrn TimecopDateTime instance on PHP >= 5.3.4
    • The previous version returns DateTime instance
    • Implement identical function timecop_date_create_from_format()
    • BUG: not supporting "relative formats" for this method currently.
  • Fix behavior of TimecopDateTime::_construct() when its 2nd argument is specified.

version 1.0.4, 2013/03/11

  • Fix SIGSEGV in TimecopDateTime::__construct() called with NULL as 1st argument

version 1.0.3, 2013/03/09

  • Fix the time traveling implementation for TimecopDateTime::__construct()
  • Fix timecop_date_create() to return TimecopDateTime instance
    • The previous version returns DateTime instance
  • Add TimecopDateTime::getTimestamp(), TimecopDateTime::setTimestamp() only for PHP 5.2.x

version 1.0.2, 2013/03/06

  • Implement timecop_date_create()

Version 1.0.1, 2013/03/04

  • Implement time traveling feature for TimecopDateTime::__construct() with 1 or 2 arguments
    • The previous version works correctly only for no arguments calling: "new TimecopDateTime()"

version 1.0.0, 2012/11/21

  • Fix memory leak

version 0.0.1, 2012/06/19

  • Initial Release

LICENSE

The MIT License

Copyright (c) 2012-2017 Yoshio HANAWA

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

php-timecop's People

Contributors

francisbesset avatar hnw avatar mcfedr avatar nojimage avatar remicollet avatar shouze avatar tenkoma avatar tscheepers avatar withgod avatar zonuexe avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

php-timecop's Issues

Test suite failure with (upcoming 7.3.0RC4)

Test suite was OK with 7.3.0RC3

With upcomiong RC4 (alreay tagged, will be announced tomorrow)

=====================================================================
PHP         : /opt/remi/php73/root/usr/bin/php 
PHP_SAPI    : cli
PHP_VERSION : 7.3.0RC4
ZEND_VERSION: 3.3.0-dev
PHP_OS      : Linux - Linux builder.remirepo.net 4.18.13-100.fc27.x86_64 #1 SMP Wed Oct 10 18:34:01 UTC 2018 x86_64
INI actual  : /dev/shm/BUILD/php73-php-pecl-timecop-1.2.10/NTS
More .INIs  :   
CWD         : /dev/shm/BUILD/php73-php-pecl-timecop-1.2.10/NTS
Extra dirs  : 
VALGRIND    : Not used
=====================================================================
TIME START 2018-10-24 06:58:27
=====================================================================
PASS Check for timecop_freeze() [tests/core_001.phpt] 
PASS Check for timecop_travel() [tests/core_002.phpt] 
PASS Check for timecop_scale() [tests/core_003.phpt] 
PASS Check for timecop_return() [tests/core_004.phpt] 
PASS Test for Timecop::freeze() [tests/core_005.phpt] 
PASS Check for Timecop::travel() [tests/core_006.phpt] 
PASS Check for Timecop::scale() [tests/core_007.phpt] 
PASS Check for Timecop::return() [tests/core_008.phpt] 
SKIP Test for date_timestamp_get() on PHP 5.2 [tests/core_009.phpt] reason: this test is for PHP 5.2.x
SKIP Test for date_timestamp_set() on PHP 5.2 [tests/core_010.phpt] reason: this test is for PHP 5.2.x
PASS Test for $_SERVER['REQUEST_TIME'] when timecop.sync_request_time=1 [tests/core_011.phpt] 
PASS Test for $_SERVER['REQUEST_TIME'] when timecop.sync_request_time=0 [tests/core_012.phpt] 
PASS Test for phpinfo() [tests/core_013.phpt] 
PASS Test for DateTime/TimecopDateTime/TimecopOrigDateTime inheritance [tests/date_001.phpt] 
PASS Test for TimecopDateTime::__construct [tests/date_002.phpt] 
PASS Test for serialize/unserialize TimecopDateTime instance [tests/date_003.phpt] 
PASS Check for compareing TimecopDateTime instance [tests/date_004.phpt] 
PASS Check for clone TimecopDateTime instance [tests/date_005.phpt] 
PASS Test for timecop_date_create [tests/date_006.phpt] 
TEST 20/71 [tests/date_007.phpt]
========DIFF========
004+ string(32) "2010-01-02 03:04:05.678000-08:00"
004- string\(32\) "2010-01-02 03:04:05\.(\1)000-08:00"
011+ timecop_date_create_from_format('u', '654321') is differ from date_create_from_format() : 2018-10-23T23:58:30-07:00 !== 2018-10-23T00:00:00-07:00
========DONE========
FAIL Test for timecop_date_create_from_format() [tests/date_007.phpt] 
TEST 21/71 [tests/date_008.phpt]
========DIFF========
004+ string(32) "2010-01-02 03:04:05.678000-08:00"
004- string\(32\) "2010-01-02 03:04:05\.(\1)000-08:00"
011+ TimecopDateTime::createFromFormat('u', '654321') is differ from DateTime::createFromFormat() : 2018-10-23T23:58:30-07:00 !== 2018-10-23T00:00:00-07:00
========DONE========
FAIL Test for TimecopDateTime::createFromFormat() [tests/date_008.phpt] 
PASS Test for DateTime/TimecopDateTime/TimecopOrigDateTime inheritance when function override is enabled [tests/date_override_001.phpt] 
PASS Method overrideing test for DateTime::__construct [tests/date_override_002.phpt] 
PASS Test for serialize/unserialize overridden DateTime instance [tests/date_override_003.phpt] 
PASS Function overrideing test for date_create [tests/date_override_006.phpt] 
TEST 26/71 [tests/date_override_007.phpt]
========DIFF========
004+ string(32) "2010-01-02 03:04:05.678000-08:00"
004- string\(32\) "2010-01-02 03:04:05\.(\1)000-08:00"
011+ date_create_from_format('u', '654321') is differ from timecop_orig_date_create_from_format() : 2018-10-23T23:58:30-07:00 !== 2018-10-23T00:00:00-07:00
========DONE========
FAIL Function overrideing test for date_create_from_format() [tests/date_override_007.phpt] 
TEST 27/71 [tests/date_override_008.phpt]
========DIFF========
004+ string(32) "2010-01-02 03:04:05.678000-08:00"
004- string\(32\) "2010-01-02 03:04:05\.(\1)000-08:00"
011+ DateTime::createFromFormat('u', '654321') is differ from TimecopOrigDateTime::createFromFormat() : 2018-10-23T23:58:30-07:00 !== 2018-10-23T00:00:00-07:00
========DONE========
FAIL Method overrideing test for DateTime::createFromFormat() [tests/date_override_008.phpt] 
PASS Test for timecop_time [tests/func_001.phpt] 
PASS Test for timecop_mktime() [tests/func_002.phpt] 
PASS Test for timecop_gmmktime() [tests/func_003.phpt] 
PASS Test for timecop_date() [tests/func_004.phpt] 
PASS Test for timecop_gmdate [tests/func_005.phpt] 
PASS Test for timecop_idate [tests/func_006.phpt] 
PASS Test for timecop_getdate [tests/func_007.phpt] 
PASS Test for timecop_localtime [tests/func_008.phpt] 
PASS Test for timecop_strtotime [tests/func_009.phpt] 
PASS Test for timecop_strftime [tests/func_010.phpt] 
PASS Test for timecop_gmstrftime [tests/func_011.phpt] 
PASS Test for timecop_microtime [tests/func_012.phpt] 
PASS Test for timecop_gettimeofday [tests/func_013.phpt] 
PASS Test for timecop_unixtojd [tests/func_014.phpt] 
PASS Function overrideing test for time [tests/func_override_001.phpt] 
PASS Function overrideing test for mktime() [tests/func_override_002.phpt] 
PASS Function overrideing test for gmmktime() [tests/func_override_003.phpt] 
PASS Function overrideing test for date() [tests/func_override_004.phpt] 
PASS Function overrideing test for gmdate [tests/func_override_005.phpt] 
PASS Function overrideing test for idate [tests/func_override_006.phpt] 
PASS Function overrideing test for getdate [tests/func_override_007.phpt] 
PASS Function overrideing test for localtime [tests/func_override_008.phpt] 
PASS Function overrideing test for strtotime [tests/func_override_009.phpt] 
PASS Function overrideing test for strftime [tests/func_override_010.phpt] 
PASS Function overrideing test for gmstrftime [tests/func_override_011.phpt] 
PASS Function overrideing test for microtime [tests/func_override_012.phpt] 
PASS Function overrideing test for gettimeofday [tests/func_override_013.phpt] 
PASS Function overrideing test for unixtojd [tests/func_override_014.phpt] 
PASS Test for DateTimeImmutable/TimecopDateTimeImmutable/TimecopOrigDateTimeImmutable inheritance [tests/immutable_001.phpt] 
PASS Check for TimecopDateTimeImmutable::__construct [tests/immutable_002.phpt] 
PASS Check for serialize/unserialize TimecopDateTimeImmutable instance [tests/immutable_003.phpt] 
PASS Check for compareing TimecopDateTimeImmutable instance [tests/immutable_004.phpt] 
PASS Check for clone TimecopDateTimeImmutable instance [tests/immutable_005.phpt] 
PASS Check for timecop_date_create_immutable [tests/immutable_006.phpt] 
TEST 62/71 [tests/immutable_007.phpt]
========DIFF========
004+ string(32) "2010-01-02 03:04:05.678000-08:00"
004- string\(32\) "2010-01-02 03:04:05\.(\1)000-08:00"
011+ timecop_date_create_immutable_from_format('u', '654321') is differ from date_create_immutable_from_format() : 2018-10-23T23:58:31-07:00 !== 2018-10-23T00:00:00-07:00
========DONE========
FAIL Check for timecop_date_create_immutable_from_format() [tests/immutable_007.phpt] 
TEST 63/71 [tests/immutable_008.phpt]
========DIFF========
004+ string(32) "2010-01-02 03:04:05.678000-08:00"
004- string\(32\) "2010-01-02 03:04:05\.(\1)000-08:00"
011+ TimecopDateTimeImmutable::createFromFormat('u', '654321') is differ from DateTimeImmutable::createFromFormat() : 2018-10-23T23:58:31-07:00 !== 2018-10-23T00:00:00-07:00
========DONE========
FAIL Test for TimecopDateTimeImmutable::createFromFormat() [tests/immutable_008.phpt] 
PASS Test for DateTimeImmutable/TimecopDateTimeImmutable/TimecopOrigDateTimeImmutable inheritance when function override is enabled [tests/immutable_override_001.phpt] 
PASS Function overrideing test for date_create_immutable [tests/immutable_override_006.phpt] 
TEST 66/71 [tests/immutable_override_007.phpt]
========DIFF========
004+ string(32) "2010-01-02 03:04:05.678000-08:00"
004- string\(32\) "2010-01-02 03:04:05\.(\1)000-08:00"
011+ date_create_immutable_from_format('u', '654321') is differ from timecop_orig_date_create_immutable_from_format() : 2018-10-23T23:58:31-07:00 !== 2018-10-23T00:00:00-07:00
========DONE========
FAIL Function overrideing test for date_create_immutable_from_format() [tests/immutable_override_007.phpt] 
TEST 67/71 [tests/immutable_override_008.phpt]
========DIFF========
004+ string(32) "2010-01-02 03:04:05.678000-08:00"
004- string\(32\) "2010-01-02 03:04:05\.(\1)000-08:00"
011+ DateTimeImmutable::createFromFormat('u', '654321') is differ from TimecopOrigDateTimeImmutable::createFromFormat() : 2018-10-23T23:58:31-07:00 !== 2018-10-23T00:00:00-07:00
========DONE========
FAIL Method overrideing test for DateTimeImmutable::createFromFormat() [tests/immutable_override_008.phpt] 
PASS Check for issue #9 (Issue with using timecop constructor) [tests/issue_009.phpt] 
PASS Check for issue #10 (Timecop segfaults when set_error_handler throws an exception) [tests/issue_010.phpt] 
PASS Check for issue #13 (Exception: Failed to parse time string ... giving up time traveling) [tests/issue_013.phpt] 
PASS Check for issue #14 (All PHPUnit assertions involving DateTime comparison fail with PHP 7.1) [tests/issue_014.phpt] 
=====================================================================
TIME END 2018-10-24 06:58:31

=====================================================================
TEST RESULT SUMMARY
---------------------------------------------------------------------
Exts skipped    :    0
Exts tested     :   16
---------------------------------------------------------------------

Number of tests :   71                69
Tests skipped   :    2 (  2.8%) --------
Tests warned    :    0 (  0.0%) (  0.0%)
Tests failed    :    8 ( 11.3%) ( 11.6%)
Expected fail   :    0 (  0.0%) (  0.0%)
Tests passed    :   61 ( 85.9%) ( 88.4%)
---------------------------------------------------------------------
Time taken      :    4 seconds
=====================================================================

Can timecop be used to override the native functions for all requests?

We have some Behat scenarios which revolve around what happens just before and just after midday.

So we need to specify the time in a step, then make a request to a URL to see what happens.

I thought timecop might cover this, but it seems to only affect the process where you call timecop_freeze().

Am I missing something, or do I need to look for another approach.

Unexpected segmentation fault after homebrew installation

When I brew install php71 on macOS Sierra with PHP 7.1.8 my Laravel 5.4 project runs smoothly. However when in brew install php71 php71-timecop my Laravel application can't run php artisan serve consistently, which is used as a webserver. Sometimes it does start, but when navigating a couple of pages the server shuts down with again a segfault. This does not happen when timecop is not installed.

schermafbeelding 2017-08-31 om 14 48 05

I saw in homebrew that the current version is 1.2.4 (stable) but the readme here states it is a beta version?

schermafbeelding 2017-08-31 om 14 47 07

Timecop segfaults when set_error_handler throws an exception

mktime is a function that according to the documentation you are not supposed to call without arguments. When you call mktime (the built-in PHP version) with no arguments it returns successfully, but emits a E_STRICT error/warning that says:

"PHP Strict Standards: mktime(): You should be using the time() function instead in php shell code on line 1"

After this module is installed, it instead emits:

"PHP Strict Standards: timecop_mktime(): You should be using the time() function instead in php shell code on line 1"

So that's the same behaviour (except for a changed function name). However, if you have the practice of converting errors into exceptions, then the module apparently causes a segmentation fault. I'm not entirely sure how this happens. It bit me because PHPUnit by default will convert PHP errors into exceptions. But the problem isn't necessarily with PHPUnit -- consider the following code:

The output with the built-in PHP mktime is:

About to call mktime:
PHP Fatal error: Uncaught exception 'Exception' with message 'mktime(): You should be using the time() function instead' in /src/shp/temp.php:5
Stack trace:

0 [internal function]: handler(2048, 'mktime(): You s...', '...', 10, Array)

1 /src/shp/temp.php(10): mktime()

2 {main}

thrown in /src/shp/temp.php on line 5

And with php-timecop it is

About to call mktime:
Segmentation fault (core dumped)

This seems to me like a bug in timecop. For my purposes, I can (and probably will) workaround the issue, but I figured I'd submit a bug report anyway.

PHPStan reports that there is no constructor for DateTimeImmutable

phpstan/phpstan#842

We have just started using Timecop for controlling time in our unit tests. Works REALLY well.

We also run PHPStan against all our code, to make sure things are sane and that they obey our standards.

One of the things the PHPStan is picking up on is a lack of a constructor in Timecop's DateTimeImmutable.

I've linked the PHPStan issue above, but the here is a snippet of the code and the error that PHPStan is generating.

<?php

namespace DT\ValueObjects;

use DateTimeImmutable;

class DateTimeMicro extends DateTimeImmutable
{
    public function __construct($time = 'now', $timezone = null)
    {
        if ($time === 'now') {
            list($dateTime, $micro) = explode('.', microtime(true));
            $time = date('Y-m-d H:i:s.', $dateTime).$micro;
        }
        parent::__construct($time, $timezone);
    }
}

With the Timecop extension enabled, we'll get an error:

DT\ValueObjects\DateTimeMicro::__construct() calls parent constructor but parent does not have one.

We have now configured things to only enable Timecop when running unit tests and use a polyfill for the Timecop functions we are using for PHPStan. That is all working fine.

But it is all a bit of a kerfuffle which could probably be fixed within Timecop.

TimeCopDateTime should extend DateTime

As new DateTime returns an instance of TimeCopDateTime it breaks all methods that expect instance of DateTime.
This only happens when I execute php through php-fpm. Inheritance works fine in CLI

Random warnings when using with pChart

I've installed the 7.2 Thread Safe (TS) x86 DLL from the PECL site into the bundled PHP from XAMPP for Windows. It is running on a Windows 10 Enterprise x64 machine.

C:\>php -v
PHP 7.2.1 (cli) (built: Jan  4 2018 04:29:12) ( ZTS MSVC15 (Visual C++ 2017) x86 )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2017 Zend Technologies

C:\>php --ri timecop

timecop

timecop => enabled
Version => 1.2.10

Directive => Local Value => Master Value
timecop.func_override => 1 => 1
timecop.sync_request_time => 1 => 1

It works really well for all HTML output, but as soon as I have multiple Graphs on my site (using pChart from here: [https://github.com/bozhinov/pChart2.0-for-PHP7]) i get randomly the following output instead of an image:

<br />
<b>Warning</b>:  Unknown: timecop couldn't create method datetime::timecop_orig___construct because already exists. in <b>Unknown</b> on line <b>0</b><br />
<br />
<b>Warning</b>:  Unknown: timecop couldn't create method datetime::timecop_orig_createfromformat because already exists. in <b>Unknown</b> on line <b>0</b><br />
<br />
<b>Warning</b>:  Unknown: timecop couldn't create method datetimeimmutable::timecop_orig___construct because already exists. in <b>Unknown</b> on line <b>0</b><br />
<br />
<b>Warning</b>:  Unknown: timecop couldn't create method datetimeimmutable::timecop_orig_createfromformat because already exists. in <b>Unknown</b> on line <b>0</b><br />
<br />
<b>Warning</b>:  Unknown: timecop couldn't find method datetime::timecop_orig___construct. in <b>Unknown</b> on line <b>0</b><br />
<br />
<b>Warning</b>:  Unknown: timecop couldn't find method datetime::timecop_orig_createfromformat. in <b>Unknown</b> on line <b>0</b><br />
<br />
<b>Warning</b>:  Unknown: timecop couldn't find method datetimeimmutable::timecop_orig___construct. in <b>Unknown</b> on line <b>0</b><br />
<br />
<b>Warning</b>:  Unknown: timecop couldn't find method datetimeimmutable::timecop_orig_createfromformat. in <b>Unknown</b> on line <b>0</b><br />

To simulate the problem I took one of the example files from pChart (not using any timecop functions), removed the output command (otherwise you get only an ugly error from Firefox that the image is invalid) and reloaded it very quickly in the browser (just hammering on the F5-Key). The above error message then randomly appears on the screen (I got lucky to stop pressing F5 to see the message).

Publishing on PECL

I would like to thank you for this fantastic extension. It helped our company easily test time-aware features.
Are there any plans for publishing this extension in PECL or PEAR2? It would simplify the installation procedure.

Causing a Segmentation Fault early on in a large test suite

I just installed php-timecop and went to run my tests suite to make sure nothing was broken it got about 12 tests in and died to a Segmentation Fault. Everything worked fine again after I commented out timecop.so in the ini file. Im not sure where to start debugging this but not that i didn't actually use timecop yet and it was still causing the seg fault

PHP 5.3.27 (cli) (built: Jul 12 2013 09:55:34)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2013 Zend Technologies
with Xdebug v2.2.3, Copyright (c) 2002-2013, by Derick Rethans

DateTimeImmutable::createFromFormat with ! returns DateTime

When creating a datetimeimmutable object with ! in the format (to zero the time). I get a DateTime object returned.

Test: echo get_class(\DateTimeImmutable::createFromFormat('!Y-m-d', '2017-10-03'));
expected: DateTimeImmutable
got: DateTime

Overridden functions ignore declare(strict_types=1)

PHP 7.0 added declare(strict_types=1);, which enables strict type checking of all method calls made in a file with that declaration, including internal functions such as strtotime(). https://wiki.php.net/rfc/scalar_type_hints_v5#strict_types_declare_directive

Timecop seems to be clobbering these type checks, resulting in no typechecking on calls made to overridden functions, as if strict_types wasn't enabled.

The following script, when run without timecop enabled, will fatally error "strtotime() expects parameter 1 to be string, null given" (as is correct). With timecop, the error is suppressed, causing execution to continue to show 'End!':

<?php
declare(strict_types=1);

strtotime(null); // fatal error without timecop, silent success with timecop
echo "End!\n";

This resulted in fatal errors being thrown in our Production environment, which do not occur in our Testing environment, as the latter uses Timecop. While those erroneous nulls should be patched, it was pretty confusing to trace down the in-production-only error, and I suspect this is likely to happen to others as the intended usage of Timecop is to be run in testing only.

Running php --re timecop throws seg fault 11.

$ php -v
PHP 7.1.14 (cli) (built: Feb  2 2018 08:42:59) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2018 Zend Technologies
    with Xdebug v2.6.0, Copyright (c) 2002-2018, by Derick Rethans

$ php -m | grep time
timecop
timezonedb

$ php --ini
Configuration File (php.ini) Path: /usr/local/etc/php/7.1
Loaded Configuration File:         /usr/local/etc/php/7.1/php.ini
Scan for additional .ini files in: /usr/local/etc/php/7.1/conf.d
Additional .ini files parsed:      /usr/local/etc/php/7.1/conf.d/ext-igbinary.ini,
/usr/local/etc/php/7.1/conf.d/ext-intl.ini,
/usr/local/etc/php/7.1/conf.d/ext-mcrypt.ini,
/usr/local/etc/php/7.1/conf.d/ext-memcached.ini,
/usr/local/etc/php/7.1/conf.d/ext-pdo_dblib.ini,
/usr/local/etc/php/7.1/conf.d/ext-redis.ini,
/usr/local/etc/php/7.1/conf.d/ext-timecop.ini,
/usr/local/etc/php/7.1/conf.d/ext-timezonedb.ini,
/usr/local/etc/php/7.1/conf.d/ext-xdebug.ini

$ cat /usr/local/etc/php/7.1/conf.d/ext-timecop.ini
[timecop]
extension="/usr/local/opt/php71-timecop/timecop.so"

$ php --ri timecop

timecop

timecop => enabled
Version => 1.2.10

Directive => Local Value => Master Value
timecop.func_override => 1 => 1
timecop.sync_request_time => 1 => 1

$ php --re timecop
Segmentation fault: 11
✘-SEGV $ 

This is the crashlog.

Process:               php [25786]
Path:                  /usr/local/Cellar/php71/7.1.14_25/bin/php
Identifier:            php
Version:               0
Code Type:             X86-64 (Native)
Parent Process:        bash [1075]
Responsible:           php [25786]
User ID:               501

Date/Time:             2018-02-16 17:04:22.870 +0000
OS Version:            Mac OS X 10.13.3 (17D47)
Report Version:        12
Anonymous UUID:        8D01F170-BCDA-13B2-15DC-E3146F76517E

Sleep/Wake UUID:       BDEF84DB-3EAB-48E8-8115-3B9B772290AF

Time Awake Since Boot: 260000 seconds
Time Since Wake:       9200 seconds

System Integrity Protection: enabled

Crashed Thread:        0  Dispatch queue: com.apple.main-thread

Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
Exception Codes:       KERN_INVALID_ADDRESS at 0x0000000000000020
Exception Note:        EXC_CORPSE_NOTIFY

Termination Signal:    Segmentation fault: 11
Termination Reason:    Namespace SIGNAL, Code 0xb
Terminating Process:   exc handler [0]

VM Regions Near 0x20:
--> 
    __TEXT                 000000010a452000-000000010ade4000 [ 9800K] r-x/rwx SM=COW  /� [/*

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   php                           	0x000000010a6861d2 _function_string + 468
1   php                           	0x000000010a68c936 _class_string + 1448
2   php                           	0x000000010a694c7c _extension_class_string + 262
3   php                           	0x000000010a809e5e zend_hash_apply_with_arguments + 361
4   php                           	0x000000010a6917c5 zim_reflection_extension___toString + 1253
5   xdebug.so                     	0x000000010b57bc57 xdebug_execute_internal + 444
6   php                           	0x000000010a7ea5b3 zend_call_function + 2275
7   php                           	0x000000010a7e9cca _call_user_function_ex + 71
8   php                           	0x000000010a685823 zim_reflection_export + 251
9   xdebug.so                     	0x000000010b57bc57 xdebug_execute_internal + 444
10  php                           	0x000000010a7ea5b3 zend_call_function + 2275
11  php                           	0x000000010a813270 zend_call_method + 556
12  php                           	0x000000010a88e375 do_cli + 4312
13  php                           	0x000000010a88d117 main + 1149
14  libdyld.dylib                 	0x00007fff66adf115 start + 1

Thread 0 crashed with X86 Thread State (64-bit):
  rax: 0x0000000000000018  rbx: 0x000000010b6641b0  rcx: 0x000000010b6641e0  rdx: 0x00000000000641b0
  rdi: 0x000000010b6641b0  rsi: 0x000000010b6641c8  rbp: 0x00007ffee57ac950  rsp: 0x00007ffee57ac8f0
   r8: 0x000000010b600040   r9: 0x0000000000000000  r10: 0x0000000000000008  r11: 0xcf626af61419af36
  r12: 0x00007ffee57acbb0  r13: 0x00007ff9790331c0  r14: 0x0000000000000010  r15: 0x000000010b66ba18
  rip: 0x000000010a6861d2  rfl: 0x0000000000010206  cr2: 0x0000000000000020
  
Logical CPU:     4
Error Code:      0x00000004
Trap Number:     14


Binary Images:
       0x10a452000 -        0x10ade3ff3 +php (0) <A4A14E1C-A737-362F-8194-7501BF6E7277> /usr/local/opt/php71/bin/php
       0x10afa7000 -        0x10b117c87 +libcrypto.1.0.0.dylib (0) <98FFE817-09E4-387B-B497-D4E74740AD0C> /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib
       0x10b198000 -        0x10b1d9fff +libssl.1.0.0.dylib (0) <CB91FB11-F59B-33C4-8D22-9E4917F6CF03> /usr/local/opt/openssl/lib/libssl.1.0.0.dylib
       0x10b1fe000 -        0x10b221ff3 +libreadline.7.dylib (0) <E16A5AF1-953F-3274-BFBA-725FD9973D8D> /usr/local/opt/readline/lib/libreadline.7.dylib
       0x10b239000 -        0x10b241ff3 +libintl.8.dylib (0) <89A49B65-40E2-340A-A6B3-B344F7AEEB32> /usr/local/opt/gettext/lib/libintl.8.dylib
       0x10b24a000 -        0x10b26dffb +libpng16.16.dylib (0) <44F2FE8A-980E-335E-A6F9-F6633924FD5E> /usr/local/opt/libpng/lib/libpng16.16.dylib
       0x10b279000 -        0x10b2a5fff +libjpeg.9.dylib (0) <47169C46-6D4C-3D79-9A59-AFE1E697CF53> /usr/local/opt/jpeg/lib/libjpeg.9.dylib
       0x10b2ae000 -        0x10b394fff +libxml2.2.dylib (0) <2394421E-54D8-3C60-927E-3628068245F1> /usr/local/opt/libxml2/lib/libxml2.2.dylib
       0x10b3ca000 -        0x10b444ff3 +libfreetype.6.dylib (0) <D75FBA27-59E1-3A9A-8998-6B94C1C1DB2D> /usr/local/opt/freetype/lib/libfreetype.6.dylib
       0x10b45e000 -        0x10b4abffb +libodbc.2.dylib (0) <BB5BB06F-71C8-3171-B6F9-09D1726A4CC9> /usr/local/opt/unixodbc/lib/libodbc.2.dylib
       0x10b4c0000 -        0x10b4c5fff +libltdl.7.dylib (0) <8C422F71-FB7F-3698-9393-12909926E8DD> /usr/local/opt/libtool/lib/libltdl.7.dylib
       0x10b578000 -        0x10b59effb +xdebug.so (0) <40C6E40E-6F70-3FDB-A582-4156394D16B1> /usr/local/opt/php71-xdebug/xdebug.so
       0x10b5b0000 -        0x10b5b6fff +igbinary.so (0) <A4EB2CCE-A08D-3DF3-855C-F23E550F33C9> /usr/local/opt/php71-igbinary/igbinary.so
       0x10b5ba000 -        0x10b5c2ff7 +libicuio.60.dylib (0) <45BB1AD3-7134-3B56-BF17-DA770BD56D65> /usr/local/opt/icu4c/lib/libicuio.60.dylib
       0x10b5c9000 -        0x10b5cefff +mcrypt.so (0) <795CE218-A248-3370-9FE5-A94992A3EEA7> /usr/local/opt/php71-mcrypt/mcrypt.so
       0x10b5d4000 -        0x10b5e0ff3 +memcached.so (0) <61F51EE5-92D8-33EB-901F-0C962B983601> /usr/local/opt/php71-memcached/memcached.so
       0x10b5eb000 -        0x10b5edfff +libmemcachedutil.2.dylib (0) <7A2E581F-D9C1-3724-AA70-0FD1DBF6CE45> /usr/local/opt/libmemcached/lib/libmemcachedutil.2.dylib
       0x10b5f1000 -        0x10b5f4ffb +pdo_dblib.so (0) <5836DD30-8E64-3B23-B73A-2DB4AA6C57F0> /usr/local/opt/php71-pdo-dblib/pdo_dblib.so
       0x10b800000 -        0x10b83dffb +intl.so (0) <C772D0C2-A6D5-3463-A236-C31B234DD0EF> /usr/local/opt/php71-intl/intl.so
       0x10b863000 -        0x10b9d2ffb +libicui18n.60.dylib (0) <E77ABF20-CB1B-33C3-9461-3D88817286FF> /usr/local/opt/icu4c/lib/libicui18n.60.dylib
       0x10bac2000 -        0x10bbc8fff +libicuuc.60.dylib (0) <09BA8968-5B81-3DFE-A7EF-612A6BBBB776> /usr/local/opt/icu4c/lib/libicuuc.60.dylib
       0x10bc38000 -        0x10d5e0fff +libicudata.60.2.dylib (0) <BBBFF5B7-F3C6-3E80-BC0C-E2355BA523CA> /usr/local/opt/icu4c/lib/libicudata.60.2.dylib
       0x10d5e2000 -        0x10d5ffff3 +libmcrypt.4.dylib (0) <55DFB1B0-9430-3162-9607-E86F037B4162> /usr/local/opt/mcrypt/lib/libmcrypt.4.dylib
       0x10d611000 -        0x10d632fff +libmemcached.11.dylib (0) <1FD2FB29-1574-3F2D-B269-FF68F50E418E> /usr/local/opt/libmemcached/lib/libmemcached.11.dylib
       0x10d63d000 -        0x10d686ffb +libsybdb.5.dylib (0) <0707F7D3-8742-3185-8F51-5F431D087139> /usr/local/opt/freetds/lib/libsybdb.5.dylib
       0x10d695000 -        0x10d6d1fff +redis.so (0) <4EA61B3A-2D3A-3005-8160-286738F443B3> /usr/local/opt/php71-redis/redis.so
       0x10d6e8000 -        0x10d6ecff3 +timecop.so (0) <7DAA153D-6CAD-3EF1-BA7C-F9B20CA370A6> /usr/local/opt/php71-timecop/timecop.so
       0x10d6f2000 -        0x10d7a1ff7 +timezonedb.so (0) <D2E94D3D-6B99-3982-B3AC-9ED65F0ACC5E> /usr/local/opt/php71-timezonedb/timezonedb.so
       0x110f2c000 -        0x110f7698f  dyld (519.2.2) <6695F30B-4E88-3C0B-9867-7D738C44A3E6> /usr/lib/dyld
    0x7fff3b72a000 -     0x7fff3b72afff  com.apple.Accelerate (1.11 - Accelerate 1.11) <5AA750F5-D633-32BA-B7F3-4F651FB1761E> /System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate
    0x7fff3b742000 -     0x7fff3bc40fc3  com.apple.vImage (8.1 - ???) <310976EE-E12D-39D7-8F58-6EE924E08576> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vImage.framework/Versions/A/vImage
    0x7fff3bc41000 -     0x7fff3bd9bfcb  libBLAS.dylib (1211.30.1) <0DB0D952-BCF4-3479-BA2F-785FB1A57479> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
    0x7fff3bd9c000 -     0x7fff3bdcafef  libBNNS.dylib (37) <49EB4DBA-877C-3D41-90A2-C3D982C72A54> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBNNS.dylib
    0x7fff3bdcb000 -     0x7fff3c18bff7  libLAPACK.dylib (1211.30.1) <2D4E4446-6B63-350C-BD68-A1B8FBE99539> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLAPACK.dylib
    0x7fff3c18c000 -     0x7fff3c1a1ff7  libLinearAlgebra.dylib (1211.30.1) <6C68F41D-1398-3AFE-BE72-C0ECA1B24BDC> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLinearAlgebra.dylib
    0x7fff3c1a2000 -     0x7fff3c1a7ff3  libQuadrature.dylib (3) <3D6BF66A-55B2-3692-BAC7-DEB0C676ED29> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libQuadrature.dylib
    0x7fff3c1a8000 -     0x7fff3c206fff  libSparse.dylib (79.1.1) <7AD0F8A8-FD36-36FE-B83D-58648EBD0027> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libSparse.dylib
    0x7fff3c207000 -     0x7fff3c21afff  libSparseBLAS.dylib (1211.30.1) <42506F6F-0F38-322E-9903-C1DB66E4DA05> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libSparseBLAS.dylib
    0x7fff3c21b000 -     0x7fff3c3c7fc3  libvDSP.dylib (622.20.8) <6FFCA52B-7D60-326A-ADF2-601F39A8685A> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libvDSP.dylib
    0x7fff3c3c8000 -     0x7fff3c478fef  libvMisc.dylib (622.20.8) <54F90047-879F-3260-8604-6E453149B49E> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libvMisc.dylib
    0x7fff3c479000 -     0x7fff3c479fff  com.apple.Accelerate.vecLib (3.11 - vecLib 3.11) <8A96A8ED-7B88-3D17-8D17-41D224E0EC90> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/vecLib
    0x7fff3d618000 -     0x7fff3d618fff  com.apple.ApplicationServices (48 - 50) <7627DBD6-497B-3AB7-9B63-F0532EDF09B8> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices
    0x7fff3d619000 -     0x7fff3d67ffff  com.apple.ApplicationServices.ATS (377 - 445) <CDF5F6D7-4E7D-3D28-9FBA-1B53AD9FA8F8> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/ATS
    0x7fff3d718000 -     0x7fff3d83afff  libFontParser.dylib (222.1.2) <11BD5EEF-AF18-33FB-B114-DD611932E822> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/Resources/libFontParser.dylib
    0x7fff3d83b000 -     0x7fff3d885ff7  libFontRegistry.dylib (221) <A22F82C0-B4FE-3DB5-B968-79B28257DF2F> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/Resources/libFontRegistry.dylib
    0x7fff3d9c7000 -     0x7fff3d9cbff3  com.apple.ColorSyncLegacy (4.13.0 - 1) <42C25E85-1CF3-3DEC-A434-BE69F68F4318> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ColorSyncLegacy.framework/Versions/A/ColorSyncLegacy
    0x7fff3da6b000 -     0x7fff3dabdff7  com.apple.HIServices (1.22 - 622) <2E83CD6F-ED98-3C29-BD0A-8525E38AB5DB> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/HIServices.framework/Versions/A/HIServices
    0x7fff3dabe000 -     0x7fff3daccfff  com.apple.LangAnalysis (1.7.0 - 1.7.0) <71A9C815-AC55-3E36-A618-F6778F5119AD> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/LangAnalysis.framework/Versions/A/LangAnalysis
    0x7fff3dacd000 -     0x7fff3db19fff  com.apple.print.framework.PrintCore (13 - 503) <A69E2BAD-2B66-38CC-9D3A-0A0EBC41341D> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/PrintCore.framework/Versions/A/PrintCore
    0x7fff3db1a000 -     0x7fff3db54fff  com.apple.QD (3.12 - 403) <38D8106A-4FFA-3FE9-9999-714CADD7EE9C> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/QD.framework/Versions/A/QD
    0x7fff3db55000 -     0x7fff3db61fff  com.apple.speech.synthesis.framework (7.4.1 - 7.4.1) <9ABE85D9-6E4A-3CEF-AA09-F81E52730598> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/SpeechSynthesis.framework/Versions/A/SpeechSynthesis
    0x7fff3db62000 -     0x7fff3ddedfff  com.apple.audio.toolbox.AudioToolbox (1.14 - 1.14) <46EDC245-5877-3438-805C-3AA0316E3F5C> /System/Library/Frameworks/AudioToolbox.framework/Versions/A/AudioToolbox
    0x7fff3e104000 -     0x7fff3e496fff  com.apple.CFNetwork (893.13.1 - 893.13.1) <3ECC6AD0-B47D-38D2-BF26-496B34847D25> /System/Library/Frameworks/CFNetwork.framework/Versions/A/CFNetwork
    0x7fff3e9b7000 -     0x7fff3ea70ff7  com.apple.ColorSync (4.13.0 - 546) <A5E013D9-7305-3026-879E-4D1F038A430D> /System/Library/Frameworks/ColorSync.framework/Versions/A/ColorSync
    0x7fff3ebfd000 -     0x7fff3ec90ff7  com.apple.audio.CoreAudio (4.3.0 - 4.3.0) <F91FDE26-0702-3E44-8931-E2CAD8E36F5A> /System/Library/Frameworks/CoreAudio.framework/Versions/A/CoreAudio
    0x7fff3ed21000 -     0x7fff3f075fe7  com.apple.CoreData (120 - 849.2) <CE0AF596-64C0-34F3-AFE0-B94D18C09957> /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData
    0x7fff3f076000 -     0x7fff3f142fff  com.apple.CoreDisplay (1.0 - 81.7) <D8030B81-097E-3FA2-A85C-AE1A3B8EBCFB> /System/Library/Frameworks/CoreDisplay.framework/Versions/A/CoreDisplay
    0x7fff3f143000 -     0x7fff3f5e3fe7  com.apple.CoreFoundation (6.9 - 1451) <7AFE9C8F-A562-3AFC-8402-117AA02F57E9> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
    0x7fff3f5e5000 -     0x7fff3fbf2fef  com.apple.CoreGraphics (2.0 - 1129.5) <F37BFBD2-CC21-3521-B034-9D4D36197487> /System/Library/Frameworks/CoreGraphics.framework/Versions/A/CoreGraphics
    0x7fff3fbf4000 -     0x7fff3fee3fff  com.apple.CoreImage (13.0.0 - 579.2.9) <8AE143AB-6284-3B00-B56D-8C0C1826EF34> /System/Library/Frameworks/CoreImage.framework/Versions/A/CoreImage
    0x7fff402a3000 -     0x7fff402a3fff  com.apple.CoreServices (822.19 - 822.19) <44456ED2-59E4-34CB-B41B-C6A82B269949> /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices
    0x7fff402a4000 -     0x7fff40318ffb  com.apple.AE (735.1 - 735.1) <D0C73200-90A7-3FD1-A6EC-97055AA367E2> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/AE.framework/Versions/A/AE
    0x7fff40319000 -     0x7fff405f0ff7  com.apple.CoreServices.CarbonCore (1178.2 - 1178.2) <A1FE74F8-953B-371E-A8AC-E87B30FB79C6> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CarbonCore.framework/Versions/A/CarbonCore
    0x7fff405f1000 -     0x7fff40625ff7  com.apple.DictionaryServices (1.2 - 284) <3FCEE280-8DD0-37C9-BFD4-7BA87AAFC8EF> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/DictionaryServices.framework/Versions/A/DictionaryServices
    0x7fff40626000 -     0x7fff4062eff3  com.apple.CoreServices.FSEvents (1239 - 1239) <7BBC5CB7-DBC8-316B-99B0-781827159A2F> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/FSEvents.framework/Versions/A/FSEvents
    0x7fff4062f000 -     0x7fff407e7ff7  com.apple.LaunchServices (822.19 - 822.19) <2895A919-0445-3CE2-9696-40122B5A46C5> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/LaunchServices
    0x7fff407e8000 -     0x7fff40897ff7  com.apple.Metadata (10.7.0 - 1191.2.6) <FB66B298-D55D-398A-BEDB-CB7B82956AE5> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Metadata.framework/Versions/A/Metadata
    0x7fff40898000 -     0x7fff408f5ff7  com.apple.CoreServices.OSServices (822.19 - 822.19) <34BF1FAC-A0F7-37B4-950D-46408EBA9684> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/OSServices.framework/Versions/A/OSServices
    0x7fff408f6000 -     0x7fff40964fff  com.apple.SearchKit (1.4.0 - 1.4.0) <14053F88-2C76-35CA-9FC1-2A9BC0B63F88> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/SearchKit.framework/Versions/A/SearchKit
    0x7fff40965000 -     0x7fff40989ffb  com.apple.coreservices.SharedFileList (71.4 - 71.4) <4AA6DCF5-BAF8-36FA-A8B0-EDF518EFEF14> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/SharedFileList.framework/Versions/A/SharedFileList
    0x7fff40c24000 -     0x7fff40d72ffb  com.apple.CoreText (352.0 - 578.12) <DA0BC559-277A-32BA-91EA-FD2F02EA186F> /System/Library/Frameworks/CoreText.framework/Versions/A/CoreText
    0x7fff40d73000 -     0x7fff40dadff3  com.apple.CoreVideo (1.8 - 279.2) <A8FC5325-D092-3A28-A1CF-5C94B8101F71> /System/Library/Frameworks/CoreVideo.framework/Versions/A/CoreVideo
    0x7fff410b3000 -     0x7fff410b8fff  com.apple.DiskArbitration (2.7 - 2.7) <44836CE9-A9ED-3017-972A-7A0A3D6B472B> /System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitration
    0x7fff41279000 -     0x7fff4163efff  com.apple.Foundation (6.9 - 1451) <B99F94E7-117E-39CC-A65D-B7AEA8998481> /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation
    0x7fff416ae000 -     0x7fff416defff  com.apple.GSS (4.0 - 2.0) <3B4B4509-B5A3-396B-9C71-80BAE84476FA> /System/Library/Frameworks/GSS.framework/Versions/A/GSS
    0x7fff41953000 -     0x7fff419eefff  com.apple.framework.IOKit (2.0.2 - 1445.40.1) <9CFA07B9-BA6E-31E4-AD4F-C47071A8C522> /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit
    0x7fff419f0000 -     0x7fff419f7ffb  com.apple.IOSurface (209.2.2 - 209.2.2) <6D35A601-1C47-37BE-AD31-F8EB88F67573> /System/Library/Frameworks/IOSurface.framework/Versions/A/IOSurface
    0x7fff41a4e000 -     0x7fff41bc5ff7  com.apple.ImageIO.framework (3.3.0 - 1713) <D3CE3838-72C5-3860-B3A4-6937FD916329> /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO
    0x7fff41bc6000 -     0x7fff41bcaffb  libGIF.dylib (1713) <C65B2846-1B94-3BB3-BBBF-5A9E5054CE1E> /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libGIF.dylib
    0x7fff41bcb000 -     0x7fff41cb2fff  libJP2.dylib (1713) <332083DD-3D27-3DE7-9866-A36D590E511E> /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libJP2.dylib
    0x7fff41cb3000 -     0x7fff41cd6ff7  libJPEG.dylib (1713) <2D846A18-D8AF-3573-803B-BEABCBAC38D1> /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libJPEG.dylib
    0x7fff41fb2000 -     0x7fff41fd8feb  libPng.dylib (1713) <546F41CE-185C-31A0-B61C-1012AA932624> /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libPng.dylib
    0x7fff41fd9000 -     0x7fff41fdbffb  libRadiance.dylib (1713) <31787C46-4A2B-3CDF-95E9-EC1BD4794917> /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libRadiance.dylib
    0x7fff41fdc000 -     0x7fff42029feb  libTIFF.dylib (1713) <5319B2E1-83D2-30C7-A7BC-A0CE0B07885D> /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libTIFF.dylib
    0x7fff42db8000 -     0x7fff42dd1ff7  com.apple.Kerberos (3.0 - 1) <CAF075C0-4C24-3ACE-9AE6-77BEFDEA3622> /System/Library/Frameworks/Kerberos.framework/Versions/A/Kerberos
    0x7fff42dd2000 -     0x7fff42e07fff  com.apple.LDAPFramework (2.4.28 - 194.5) <8419BDB5-12DF-3BC9-871D-7A270E080249> /System/Library/Frameworks/LDAP.framework/Versions/A/LDAP
    0x7fff43750000 -     0x7fff437cffff  com.apple.Metal (124.7 - 124.7) <F161C177-80B4-3674-8147-04343702CF08> /System/Library/Frameworks/Metal.framework/Versions/A/Metal
    0x7fff437ec000 -     0x7fff43801fff  com.apple.MetalPerformanceShaders.MPSCore (1.0 - 1) <D4BCBA84-AD1B-33DC-99F3-16F9E5E50906> /System/Library/Frameworks/MetalPerformanceShaders.framework/Frameworks/MPSCore.framework/Versions/A/MPSCore
    0x7fff43802000 -     0x7fff4386dfef  com.apple.MetalPerformanceShaders.MPSImage (1.0 - 1) <E504EC97-FAD7-36DC-B151-6F89AB911E3A> /System/Library/Frameworks/MetalPerformanceShaders.framework/Frameworks/MPSImage.framework/Versions/A/MPSImage
    0x7fff4386e000 -     0x7fff43891fff  com.apple.MetalPerformanceShaders.MPSMatrix (1.0 - 1) <A5B6F6FC-A19A-32C0-A999-98B6688760C7> /System/Library/Frameworks/MetalPerformanceShaders.framework/Frameworks/MPSMatrix.framework/Versions/A/MPSMatrix
    0x7fff43892000 -     0x7fff43912ff7  com.apple.MetalPerformanceShaders.MPSNeuralNetwork (1.0 - 1) <D0D8F13F-ACD4-3B61-BE54-121CCB05ECF4> /System/Library/Frameworks/MetalPerformanceShaders.framework/Frameworks/MPSNeuralNetwork.framework/Versions/A/MPSNeuralNetwork
    0x7fff43913000 -     0x7fff43913ff7  com.apple.MetalPerformanceShaders.MetalPerformanceShaders (1.0 - 1) <2E8723FC-AA53-3596-B6A4-220A378B7A5A> /System/Library/Frameworks/MetalPerformanceShaders.framework/Versions/A/MetalPerformanceShaders
    0x7fff4491c000 -     0x7fff44928ffb  com.apple.NetFS (6.0 - 4.0) <81B22AE7-7094-30F2-BF41-84CA05EDB95B> /System/Library/Frameworks/NetFS.framework/Versions/A/NetFS
    0x7fff47719000 -     0x7fff47766ffb  com.apple.opencl (2.8.12 - 2.8.12) <7F9BF7F0-AFB2-349A-BF9B-2DE5288380C4> /System/Library/Frameworks/OpenCL.framework/Versions/A/OpenCL
    0x7fff47767000 -     0x7fff47783ffb  com.apple.CFOpenDirectory (10.13 - 207) <A229B355-337B-33F4-AAA8-C751BEF0B718> /System/Library/Frameworks/OpenDirectory.framework/Versions/A/Frameworks/CFOpenDirectory.framework/Versions/A/CFOpenDirectory
    0x7fff47784000 -     0x7fff4778ffff  com.apple.OpenDirectory (10.13 - 207) <D8AA4C58-149E-3504-88CD-F5B59F882C25> /System/Library/Frameworks/OpenDirectory.framework/Versions/A/OpenDirectory
    0x7fff4890e000 -     0x7fff48910fff  libCVMSPluginSupport.dylib (16.4.2) <A967BC8B-ABB3-393F-BF34-BD32B45831F7> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libCVMSPluginSupport.dylib
    0x7fff48911000 -     0x7fff48915ff7  libCoreFSCache.dylib (162.4) <B325B709-0C81-357A-B9F1-6E0027B64F9B> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libCoreFSCache.dylib
    0x7fff48916000 -     0x7fff4891afff  libCoreVMClient.dylib (162.4) <B129DB84-39BA-34E4-9FB7-20A020A1BB86> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libCoreVMClient.dylib
    0x7fff4891b000 -     0x7fff48923fff  libGFXShared.dylib (16.4.2) <07F1D947-F79B-3608-9080-E4DBFE13AF1D> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGFXShared.dylib
    0x7fff48924000 -     0x7fff4892ffff  libGL.dylib (16.4.2) <97D6871A-BAF1-33DD-9ED7-BE7BB437F378> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib
    0x7fff48930000 -     0x7fff4896bfe7  libGLImage.dylib (16.4.2) <3E2802DF-4998-31DB-B3A2-65720DE919A5> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLImage.dylib
    0x7fff48ad9000 -     0x7fff48b17ffb  libGLU.dylib (16.4.2) <ECABCFAB-E400-3667-8EE1-586C07E0E214> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLU.dylib
    0x7fff4948f000 -     0x7fff4949dffb  com.apple.opengl (16.4.2 - 16.4.2) <C8C31EF5-8DB4-336F-A87C-5D520C7EFDC5> /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL
    0x7fff4a2e5000 -     0x7fff4a52dfff  com.apple.QuartzCore (1.11 - 584.8.102) <4479AF33-E6EA-3037-A2C1-3C6F12B1260A> /System/Library/Frameworks/QuartzCore.framework/Versions/A/QuartzCore
    0x7fff4ad66000 -     0x7fff4b07dff7  com.apple.security (7.0 - 58286.41.2) <EB297497-884A-362F-B566-73A14A2F25FE> /System/Library/Frameworks/Security.framework/Versions/A/Security
    0x7fff4b07e000 -     0x7fff4b108ff7  com.apple.securityfoundation (6.0 - 55185.30.4) <65144003-B9E2-3DE3-8923-F2BAA68BBF4E> /System/Library/Frameworks/SecurityFoundation.framework/Versions/A/SecurityFoundation
    0x7fff4b13a000 -     0x7fff4b13dffb  com.apple.xpc.ServiceManagement (1.0 - 1) <B11C3C64-6FE7-3A78-B583-D790B7CCE95A> /System/Library/Frameworks/ServiceManagement.framework/Versions/A/ServiceManagement
    0x7fff4b4e2000 -     0x7fff4b552ff3  com.apple.SystemConfiguration (1.17 - 1.17) <3C6B2BB9-43AB-39AD-8027-38E30A8A4186> /System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemConfiguration
    0x7fff4e185000 -     0x7fff4e211ff7  com.apple.APFS (1.0 - 1) <9D67579C-7FB4-3AD9-AB4F-9174A552EB37> /System/Library/PrivateFrameworks/APFS.framework/Versions/A/APFS
    0x7fff4ef99000 -     0x7fff4efe1ff3  com.apple.AppleJPEG (1.0 - 1) <8BBD5180-5BF9-33DB-8B91-974B1D0AECFB> /System/Library/PrivateFrameworks/AppleJPEG.framework/Versions/A/AppleJPEG
    0x7fff4f013000 -     0x7fff4f01bff3  com.apple.AppleSRP (5.0 - 1) <4CEC34CF-63E3-3023-B61B-F8D133698534> /System/Library/PrivateFrameworks/AppleSRP.framework/Versions/A/AppleSRP
    0x7fff4f01c000 -     0x7fff4f044fff  com.apple.applesauce (1.0 - ???) <32FF4851-2F68-35BA-835F-91856A20C323> /System/Library/PrivateFrameworks/AppleSauce.framework/Versions/A/AppleSauce
    0x7fff4f830000 -     0x7fff4f837ff7  com.apple.coreservices.BackgroundTaskManagement (1.0 - 57.1) <47B6301F-D908-3811-BB9E-DA16D9B29A34> /System/Library/PrivateFrameworks/BackgroundTaskManagement.framework/Versions/A/BackgroundTaskManagement
    0x7fff5124f000 -     0x7fff51258ff3  com.apple.CommonAuth (4.0 - 2.0) <11B2D184-36B8-3624-B1AD-7B6037D76160> /System/Library/PrivateFrameworks/CommonAuth.framework/Versions/A/CommonAuth
    0x7fff51af5000 -     0x7fff51afeff7  com.apple.frameworks.CoreDaemon (1.3 - 1.3) <0A87A91C-A2CF-3BB1-9038-7F610111BC30> /System/Library/PrivateFrameworks/CoreDaemon.framework/Versions/B/CoreDaemon
    0x7fff51c65000 -     0x7fff51c75ff7  com.apple.CoreEmoji (1.0 - 69.3) <A4357F5C-0C38-3A61-B456-D7321EB2CEE5> /System/Library/PrivateFrameworks/CoreEmoji.framework/Versions/A/CoreEmoji
    0x7fff53377000 -     0x7fff5337bffb  com.apple.DSExternalDisplay (3.1 - 380) <BEC07C7C-F3AC-3CF3-B13E-3EBFD6224C0D> /System/Library/PrivateFrameworks/DSExternalDisplay.framework/Versions/A/DSExternalDisplay
    0x7fff543aa000 -     0x7fff547d8fff  com.apple.vision.FaceCore (3.3.2 - 3.3.2) <80C97AD7-D5C2-311A-B268-4AA60CAD6CED> /System/Library/PrivateFrameworks/FaceCore.framework/Versions/A/FaceCore
    0x7fff587ec000 -     0x7fff587fbfff  com.apple.GraphVisualizer (1.0 - 5) <0A93C5DE-0D28-312E-8764-6B0FB805ED91> /System/Library/PrivateFrameworks/GraphVisualizer.framework/Versions/A/GraphVisualizer
    0x7fff58873000 -     0x7fff588e7fff  com.apple.Heimdal (4.0 - 2.0) <ACC132E5-97F1-3B36-AD7B-4E6CC077E691> /System/Library/PrivateFrameworks/Heimdal.framework/Versions/A/Heimdal
    0x7fff59199000 -     0x7fff591a0ffb  com.apple.IOAccelerator (376.6 - 376.6) <A47129CC-F386-3C31-AD66-C19A70615A50> /System/Library/PrivateFrameworks/IOAccelerator.framework/Versions/A/IOAccelerator
    0x7fff591a4000 -     0x7fff591bbfff  com.apple.IOPresentment (1.0 - 32.1) <B95F06EA-9D5D-311D-9912-978AE42ECFCE> /System/Library/PrivateFrameworks/IOPresentment.framework/Versions/A/IOPresentment
    0x7fff5983f000 -     0x7fff59934fff  com.apple.LanguageModeling (1.0 - 159.3.1) <9B08E18E-69B4-3413-A03A-EF5AE4BE6277> /System/Library/PrivateFrameworks/LanguageModeling.framework/Versions/A/LanguageModeling
    0x7fff59935000 -     0x7fff59977ff7  com.apple.Lexicon-framework (1.0 - 33.2) <5CC5E8EE-62A1-3EA5-B300-A39ABD0CF12D> /System/Library/PrivateFrameworks/Lexicon.framework/Versions/A/Lexicon
    0x7fff5997b000 -     0x7fff59982ff7  com.apple.LinguisticData (1.0 - 238.3) <228AF7CA-649A-3E24-BBC7-8A24B39B3FC4> /System/Library/PrivateFrameworks/LinguisticData.framework/Versions/A/LinguisticData
    0x7fff5a5e4000 -     0x7fff5a64dff7  com.apple.gpusw.MetalTools (1.0 - 1) <F77943BC-0466-3700-BEDF-CDD13125D36A> /System/Library/PrivateFrameworks/MetalTools.framework/Versions/A/MetalTools
    0x7fff5a866000 -     0x7fff5a88efff  com.apple.MultitouchSupport.framework (1204.13 - 1204.13) <6C5D778D-4AB7-39A4-989B-2E8D2D57B3A0> /System/Library/PrivateFrameworks/MultitouchSupport.framework/Versions/A/MultitouchSupport
    0x7fff5aaf3000 -     0x7fff5aafefff  com.apple.NetAuth (6.2 - 6.2) <5C6F492A-28EF-3A0E-B573-6F3D60CFF0C7> /System/Library/PrivateFrameworks/NetAuth.framework/Versions/A/NetAuth
    0x7fff60a94000 -     0x7fff60d2efff  com.apple.SkyLight (1.600.0 - 312.23.4) <455CE6F6-CD58-3E08-8300-CA8BDD3377FC> /System/Library/PrivateFrameworks/SkyLight.framework/Versions/A/SkyLight
    0x7fff625f4000 -     0x7fff625fbff3  com.apple.TCC (1.0 - 1) <C807D3F0-FE20-3FC0-8D61-306477ABEBC4> /System/Library/PrivateFrameworks/TCC.framework/Versions/A/TCC
    0x7fff62969000 -     0x7fff6296afff  com.apple.TrustEvaluationAgent (2.0 - 31) <39F533B2-211E-3635-AF47-23F27749FF4A> /System/Library/PrivateFrameworks/TrustEvaluationAgent.framework/Versions/A/TrustEvaluationAgent
    0x7fff64262000 -     0x7fff64264ffb  com.apple.loginsupport (1.0 - 1) <5E2C4AA7-066D-3FDB-B0E1-4CDAF287392C> /System/Library/PrivateFrameworks/login.framework/Versions/A/Frameworks/loginsupport.framework/Versions/A/loginsupport
    0x7fff643c8000 -     0x7fff643fbfff  libclosured.dylib (519.2.2) <48051216-5647-3643-B979-B77D0FD20011> /usr/lib/closure/libclosured.dylib
    0x7fff6449b000 -     0x7fff644d4ff7  libCRFSuite.dylib (41) <AB2DA745-F22C-30CF-81D4-35DD716463B8> /usr/lib/libCRFSuite.dylib
    0x7fff644d5000 -     0x7fff644e0fff  libChineseTokenizer.dylib (28) <D30A7DB6-058F-3286-9583-60C9EEB77A6E> /usr/lib/libChineseTokenizer.dylib
    0x7fff64572000 -     0x7fff64573ff3  libDiagnosticMessagesClient.dylib (104) <9712E980-76EE-3A89-AEA6-DF4BAF5C0574> /usr/lib/libDiagnosticMessagesClient.dylib
    0x7fff645aa000 -     0x7fff64774ff3  libFosl_dynamic.dylib (17.7) <B2476843-7FA7-3E62-B79F-2B15FE557E63> /usr/lib/libFosl_dynamic.dylib
    0x7fff647ac000 -     0x7fff647acfff  libOpenScriptingUtil.dylib (174) <203D2C39-61BB-3713-A502-2D17B04A42AC> /usr/lib/libOpenScriptingUtil.dylib
    0x7fff648da000 -     0x7fff648dbff3  libSystem.B.dylib (1252) <47329E26-DC23-3EBA-9461-37755368327D> /usr/lib/libSystem.B.dylib
    0x7fff6496e000 -     0x7fff6496efff  libapple_crypto.dylib (109.40.1) <32252490-B1E9-363F-AEED-3EC97D919348> /usr/lib/libapple_crypto.dylib
    0x7fff6496f000 -     0x7fff64985ff7  libapple_nghttp2.dylib (1.24) <01402BC4-4822-3676-9C80-50D83F816424> /usr/lib/libapple_nghttp2.dylib
    0x7fff64986000 -     0x7fff649b0ff3  libarchive.2.dylib (54) <8FC28DD8-E315-3C3E-95FE-D1D2CBE49888> /usr/lib/libarchive.2.dylib
    0x7fff64a36000 -     0x7fff64a36ff3  libauto.dylib (187) <A05C7900-F8C7-3E75-8D3F-909B40C19717> /usr/lib/libauto.dylib
    0x7fff64a37000 -     0x7fff64aeefff  libboringssl.dylib (109.40.1) <75F5F125-B919-3318-BD12-29CB5E868475> /usr/lib/libboringssl.dylib
    0x7fff64aef000 -     0x7fff64affff3  libbsm.0.dylib (39) <770B341F-3BB7-3123-B53C-F2D58868A963> /usr/lib/libbsm.0.dylib
    0x7fff64b00000 -     0x7fff64b0dffb  libbz2.1.0.dylib (38) <0A5086BB-4724-3C14-979D-5AD4F26B5B45> /usr/lib/libbz2.1.0.dylib
    0x7fff64b0e000 -     0x7fff64b64fff  libc++.1.dylib (400.9) <FCF5E1F6-2B04-3545-8004-F3AB32FED172> /usr/lib/libc++.1.dylib
    0x7fff64b65000 -     0x7fff64b89ff7  libc++abi.dylib (400.7) <217656D5-BC40-37FF-B322-91CB2AAD4F34> /usr/lib/libc++abi.dylib
    0x7fff64b8b000 -     0x7fff64b9bfff  libcmph.dylib (6) <A5509EE8-7E00-3224-8814-015B077A3CF5> /usr/lib/libcmph.dylib
    0x7fff64b9c000 -     0x7fff64bb2fff  libcompression.dylib (47) <E64D4416-DFBF-314B-BBB9-BED23C3A251C> /usr/lib/libcompression.dylib
    0x7fff64e5f000 -     0x7fff64e77ff7  libcoretls.dylib (155) <DFE2454F-2FE3-3B2B-A22B-422947C34C69> /usr/lib/libcoretls.dylib
    0x7fff64e78000 -     0x7fff64e79ffb  libcoretls_cfhelpers.dylib (155) <D3F4B882-40C1-3CD4-927B-0E0ED6031D0B> /usr/lib/libcoretls_cfhelpers.dylib
    0x7fff65012000 -     0x7fff651a2fff  libcrypto.35.dylib (22) <067CFC21-249D-392D-ADE1-785100BF0F83> /usr/lib/libcrypto.35.dylib
    0x7fff65349000 -     0x7fff6539fff3  libcups.2.dylib (462.1) <B78448A0-9C97-3D4A-823E-EBE37B2B7CA6> /usr/lib/libcups.2.dylib
    0x7fff653ca000 -     0x7fff6541effb  libcurl.4.dylib (105.40.1) <17EC22AC-0CE7-3FA7-AD55-B636806F46F8> /usr/lib/libcurl.4.dylib
    0x7fff654dd000 -     0x7fff654ddfff  libenergytrace.dylib (16) <A92AB8B8-B986-3CE6-980D-D55090FEF387> /usr/lib/libenergytrace.dylib
    0x7fff654f8000 -     0x7fff65504ffb  libexslt.0.dylib (15.10) <742FE794-B2D4-3027-A4DE-8DDA69283C36> /usr/lib/libexslt.0.dylib
    0x7fff65514000 -     0x7fff65519ff3  libheimdal-asn1.dylib (520.30.1) <14DC1451-6E22-3A48-80CB-5D33DC0F8C3B> /usr/lib/libheimdal-asn1.dylib
    0x7fff65545000 -     0x7fff65636ff7  libiconv.2.dylib (51) <0772997F-4109-38A1-91ED-0F3F16AE99E5> /usr/lib/libiconv.2.dylib
    0x7fff65637000 -     0x7fff6585effb  libicucore.A.dylib (59152.0.1) <E628882C-6F83-3DCD-B62A-2FE6F77EF6F7> /usr/lib/libicucore.A.dylib
    0x7fff658ab000 -     0x7fff658acfff  liblangid.dylib (128) <39C39393-0D05-301D-93B2-F224FC4949AA> /usr/lib/liblangid.dylib
    0x7fff658ad000 -     0x7fff658c6ffb  liblzma.5.dylib (10) <3D419A50-961F-37D2-8A01-3DC7AB7B8D18> /usr/lib/liblzma.5.dylib
    0x7fff658c7000 -     0x7fff658ddff7  libmarisa.dylib (9) <D6D2D55D-1D2E-3442-B152-B18803C0ABB4> /usr/lib/libmarisa.dylib
    0x7fff6598e000 -     0x7fff65bb6ff7  libmecabra.dylib (779.7.6) <7E255F87-BBB4-3AE5-BC82-6DEE70566D05> /usr/lib/libmecabra.dylib
    0x7fff65bbb000 -     0x7fff65bebffb  libncurses.5.4.dylib (53) <030DF747-F71B-367A-83EE-2F30B7947929> /usr/lib/libncurses.5.4.dylib
    0x7fff65d8e000 -     0x7fff65e65ffb  libnetwork.dylib (1229.30.11) <4E7A6EBA-B3DD-3001-9C97-CB423922B78C> /usr/lib/libnetwork.dylib
    0x7fff65edb000 -     0x7fff662c97e7  libobjc.A.dylib (723) <93A92316-DE1E-378C-8891-99720B50D075> /usr/lib/libobjc.A.dylib
    0x7fff662dc000 -     0x7fff662e0fff  libpam.2.dylib (22) <7B4D2CE2-1438-387A-9802-5CEEFBF26F86> /usr/lib/libpam.2.dylib
    0x7fff662e3000 -     0x7fff66317fff  libpcap.A.dylib (79.20.1) <FA13918B-A247-3181-B256-9B852C7BA316> /usr/lib/libpcap.A.dylib
    0x7fff66396000 -     0x7fff663b2ffb  libresolv.9.dylib (65) <E8F3415B-4472-3202-8901-41FD87981DB2> /usr/lib/libresolv.9.dylib
    0x7fff663ed000 -     0x7fff663fffff  libsasl2.2.dylib (211) <D9E281A2-D7BA-32CD-8B96-54972B1D9E66> /usr/lib/libsasl2.2.dylib
    0x7fff66402000 -     0x7fff66595fe7  libsqlite3.dylib (274.5) <A1DEB5AB-8FE8-332E-A7E5-F493F2223FE3> /usr/lib/libsqlite3.dylib
    0x7fff665f1000 -     0x7fff66644ffb  libssl.35.dylib (22) <4D77B502-E065-3794-90E7-39E83F9683F6> /usr/lib/libssl.35.dylib
    0x7fff66766000 -     0x7fff6679ffff  libusrtcp.dylib (1229.30.11) <537F14D0-84DF-349F-8EA0-52BB7A241E60> /usr/lib/libusrtcp.dylib
    0x7fff667a0000 -     0x7fff667a3ffb  libutil.dylib (51.20.1) <216D18E5-0BAF-3EAF-A38E-F6AC37CBABD9> /usr/lib/libutil.dylib
    0x7fff667a4000 -     0x7fff667b1fff  libxar.1.dylib (400) <0316128D-3B47-3052-995D-97B4FE5491DC> /usr/lib/libxar.1.dylib
    0x7fff667b5000 -     0x7fff6689cfff  libxml2.2.dylib (31.7) <49544596-BCF8-3765-8DC5-DB1A9A90EF92> /usr/lib/libxml2.2.dylib
    0x7fff6689d000 -     0x7fff668c5fff  libxslt.1.dylib (15.10) <66682AF6-C2D5-374C-901F-25A3E72814DC> /usr/lib/libxslt.1.dylib
    0x7fff668c6000 -     0x7fff668d8ffb  libz.1.dylib (70) <48C67CFC-940D-3857-8DAD-857774605352> /usr/lib/libz.1.dylib
    0x7fff66976000 -     0x7fff6697aff7  libcache.dylib (80) <354F3B7D-404E-3398-9EBF-65CA2CE65211> /usr/lib/system/libcache.dylib
    0x7fff6697b000 -     0x7fff66985ff3  libcommonCrypto.dylib (60118.30.2) <674286D3-7744-36A3-9AAA-49DFCD97A986> /usr/lib/system/libcommonCrypto.dylib
    0x7fff66986000 -     0x7fff6698dfff  libcompiler_rt.dylib (62) <4487CFBA-A5D7-3282-9E6B-94CAD7BE507E> /usr/lib/system/libcompiler_rt.dylib
    0x7fff6698e000 -     0x7fff66996ffb  libcopyfile.dylib (146.30.2) <2C7C67D7-562B-3FFA-973D-BACF4C10E1EC> /usr/lib/system/libcopyfile.dylib
    0x7fff66997000 -     0x7fff66a1cfff  libcorecrypto.dylib (562.30.10) <8A53EFE1-AFCA-3676-BEE1-FA5ED9F0E222> /usr/lib/system/libcorecrypto.dylib
    0x7fff66aa4000 -     0x7fff66addff7  libdispatch.dylib (913.30.4) <7D0E3183-282B-3FEE-A734-2C0ADC092084> /usr/lib/system/libdispatch.dylib
    0x7fff66ade000 -     0x7fff66afbff7  libdyld.dylib (519.2.2) <C50D02BC-A333-3313-B787-02F255A6783F> /usr/lib/system/libdyld.dylib
    0x7fff66afc000 -     0x7fff66afcffb  libkeymgr.dylib (28) <6D84A96F-C65B-38EC-BDB5-21FD2C97E7B2> /usr/lib/system/libkeymgr.dylib
    0x7fff66afd000 -     0x7fff66b09ff3  libkxld.dylib (4570.41.2) <661F47FA-F6FC-3FB1-8023-9DFE108AEEF7> /usr/lib/system/libkxld.dylib
    0x7fff66b0a000 -     0x7fff66b0aff7  liblaunch.dylib (1205.30.29) <E66F58ED-C15E-3DFB-BC22-A861E13918C6> /usr/lib/system/liblaunch.dylib
    0x7fff66b0b000 -     0x7fff66b0fffb  libmacho.dylib (900.0.1) <756F2553-07B6-3B42-ACEA-2F0F1A5E8D0F> /usr/lib/system/libmacho.dylib
    0x7fff66b10000 -     0x7fff66b12ff3  libquarantine.dylib (86) <6AC8773F-3817-3D82-99C2-01BABB9C3CBB> /usr/lib/system/libquarantine.dylib
    0x7fff66b13000 -     0x7fff66b14ff3  libremovefile.dylib (45) <912FA211-DD8C-3C92-8424-21B89F8B10FD> /usr/lib/system/libremovefile.dylib
    0x7fff66b15000 -     0x7fff66b2cfff  libsystem_asl.dylib (356.1.1) <94972913-9DF0-3C78-847C-43E58919E3DA> /usr/lib/system/libsystem_asl.dylib
    0x7fff66b2d000 -     0x7fff66b2dfff  libsystem_blocks.dylib (67) <F2493BB5-B1C6-3C4D-9F1F-1B402E0F1DB7> /usr/lib/system/libsystem_blocks.dylib
    0x7fff66b2e000 -     0x7fff66bb7ff7  libsystem_c.dylib (1244.30.3) <E0136C71-0648-36F0-9F84-82EA2748A8D7> /usr/lib/system/libsystem_c.dylib
    0x7fff66bb8000 -     0x7fff66bbbffb  libsystem_configuration.dylib (963.30.1) <0F8D0B76-4F7D-34EC-AB6C-50F9465809DA> /usr/lib/system/libsystem_configuration.dylib
    0x7fff66bbc000 -     0x7fff66bbfffb  libsystem_coreservices.dylib (51) <21A488D0-2D07-344E-8631-CC8B2A246F35> /usr/lib/system/libsystem_coreservices.dylib
    0x7fff66bc0000 -     0x7fff66bc1fff  libsystem_darwin.dylib (1244.30.3) <2F750CB1-BC26-3FA3-AE59-553EE30D451B> /usr/lib/system/libsystem_darwin.dylib
    0x7fff66bc2000 -     0x7fff66bc8ff7  libsystem_dnssd.dylib (878.30.4) <EB9BB165-45A4-367C-B33A-688D4F383A95> /usr/lib/system/libsystem_dnssd.dylib
    0x7fff66bc9000 -     0x7fff66c12ff7  libsystem_info.dylib (517.30.1) <7D79E167-4B5C-3833-81EE-3AF3FB53616D> /usr/lib/system/libsystem_info.dylib
    0x7fff66c13000 -     0x7fff66c38ff7  libsystem_kernel.dylib (4570.41.2) <5155A4C3-825B-3178-AC51-0D2D2F2A6618> /usr/lib/system/libsystem_kernel.dylib
    0x7fff66c39000 -     0x7fff66c84fcb  libsystem_m.dylib (3146) <ABB1B85F-9FFE-31B8-AD4F-E39A30794A93> /usr/lib/system/libsystem_m.dylib
    0x7fff66c85000 -     0x7fff66ca4fff  libsystem_malloc.dylib (140.40.1) <36B22C99-D772-3039-9A4C-AA31389965E1> /usr/lib/system/libsystem_malloc.dylib
    0x7fff66ca5000 -     0x7fff66d49ff3  libsystem_network.dylib (1229.30.11) <40BAD301-8744-3AD8-A688-E7925C587B00> /usr/lib/system/libsystem_network.dylib
    0x7fff66d4a000 -     0x7fff66d54ffb  libsystem_networkextension.dylib (767.40.1) <CEDC330D-28F0-3902-BEB0-10B92ACEC69F> /usr/lib/system/libsystem_networkextension.dylib
    0x7fff66d55000 -     0x7fff66d5eff3  libsystem_notify.dylib (172) <98EA3D62-7C86-30DE-8261-D020D2F1EFF3> /usr/lib/system/libsystem_notify.dylib
    0x7fff66d5f000 -     0x7fff66d66ff7  libsystem_platform.dylib (161.20.1) <C049250F-8C35-314D-810F-4E28AEAED983> /usr/lib/system/libsystem_platform.dylib
    0x7fff66d67000 -     0x7fff66d72fff  libsystem_pthread.dylib (301.30.1) <ABA848E1-6978-3B42-A3A7-608B2C36FA93> /usr/lib/system/libsystem_pthread.dylib
    0x7fff66d73000 -     0x7fff66d76ff3  libsystem_sandbox.dylib (765.40.2) <922D3D15-AB4C-3F1A-A94F-39214AF1ADB3> /usr/lib/system/libsystem_sandbox.dylib
    0x7fff66d77000 -     0x7fff66d78ff3  libsystem_secinit.dylib (30) <F06ADB8F-9E94-34A7-B3C9-2C22FDD14BAD> /usr/lib/system/libsystem_secinit.dylib
    0x7fff66d79000 -     0x7fff66d80ff7  libsystem_symptoms.dylib (820.30.7) <DC3586C2-AA56-3419-88D3-FC0DBF08E3C0> /usr/lib/system/libsystem_symptoms.dylib
    0x7fff66d81000 -     0x7fff66d94ff7  libsystem_trace.dylib (829.30.14) <69EBF017-D40F-30D7-9B0B-BFC862D761A5> /usr/lib/system/libsystem_trace.dylib
    0x7fff66d96000 -     0x7fff66d9bff7  libunwind.dylib (35.3) <6D4FCD49-D2A9-3233-95C7-A7635CE265F2> /usr/lib/system/libunwind.dylib
    0x7fff66d9c000 -     0x7fff66dc8ff7  libxpc.dylib (1205.30.29) <F7E5F1BC-614B-39CB-B6CE-92A9C7B7EC0B> /usr/lib/system/libxpc.dylib

External Modification Summary:
  Calls made by other processes targeting this process:
    task_for_pid: 0
    thread_create: 0
    thread_set_state: 0
  Calls made by this process:
    task_for_pid: 0
    thread_create: 0
    thread_set_state: 0
  Calls made by all processes on this machine:
    task_for_pid: 870669
    thread_create: 0
    thread_set_state: 0

VM Region Summary:
ReadOnly portion of Libraries: Total=337.6M resident=0K(0%) swapped_out_or_unallocated=337.6M(100%)
Writable regions: Total=48.7M written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=48.7M(100%)
 
                                VIRTUAL   REGION 
REGION TYPE                        SIZE    COUNT (non-coalesced) 
===========                     =======  ======= 
Activity Tracing                   256K        2 
Kernel Alloc Once                    8K        2 
MALLOC                            38.0M       16 
MALLOC guard page                   32K        7 
STACK GUARD                       56.0M        2 
Stack                             8192K        2 
VM_ALLOCATE                       2048K        2 
VM_ALLOCATE (reserved)              64K        2         reserved VM address space (unallocated)
__DATA                            15.6M      221 
__FONT_DATA                          4K        2 
__LINKEDIT                       191.8M       31 
__TEXT                           145.8M      216 
__UNICODE                          560K        2 
shared memory                       12K        4 
===========                     =======  ======= 
TOTAL                            458.1M      497 
TOTAL, minus reserved VM space   458.0M      497 

Wrong version in tag 1.2.4?

I guess in tag 1.2.4 there was no bump of version in php_timecop.h and php-timecop.spec as it still reads 1.2.3. Maybe other places as well?

Issue with using timecop constructor

I have the following date class which I use just to represent dates by extending the datetime object.
Code in Date.php

class Date extends \DateTime
{
    public function __construct($time='now', \DateTimeZone $timezone=null)
    {
        parent::__construct($time, $timezone);
        $this->setTime(0, 0, 0);
    }

    public function __toString() {
        return $this->format('Y-m-d');
    }
}

While trying to use timecop in my test cases it throws the following error -
PHP Fatal error: Class entry requested for an object without PHP class in
Date.php

Basically when calling the constructor with the timezone parameter as null does not work.

Merge PHP5 and PHP7 code

I think managing PHP5 and PHP7 extension code in separate codebases is horrible. Can we try to merge these files to a single file?

All PHPUnit assertions involving DateTime comparison fail with PHP 7.1

Most likely due to the "microseconds change" in PHP7.1 (http://php.net/manual/en/migration71.incompatible.php) all tests involving dates mocked using timecop now fail because they do not take microseconds into account. This is a very simple test case that passes in PHP7.0 but fails in PHP7.1 (I'm using PHPUnit 5.7):

    public function test_timecop()
    {
        $now = new \DateTime();
        timecop_freeze($now->getTimestamp());

        $this->assertEquals(new \DateTime(), $now);
    }

and the output:

Failed asserting that two DateTime objects are equal.
Expected :2016-12-23T10:33:58.528377+0100
Actual   :2016-12-23T10:33:58.528332+0100

Should the timecop_freeze signature be modified to allow "freezing" microseconds as well? Things that I can think of are either using a float (but maybe it's risky?) or a DateTime instance directly, which would also make freezing easier IMHO.

Ignoring TimecopDateTime during reflection?

Take a look at the following snippet:

<?php

class Test
{
    public function setCreatedAt(DateTime $createdAt)
    {
        $this->createdAt = $createdAt;
    }
}

$test = new Test();

$reflection = new ReflectionClass($test);
$params = $reflection->getMethod('setCreatedAt')->getParameters();

foreach ($params as $param) {
    echo $param->getClass()->getName();
}

When using Reflection's API to check the Type Hint of the params of methods, the TimecopDateTime class is found, instead of DateTime itself. How can we avoid this behavior? I'm unable to use the timecop extension since it's conflicting with Doctrine's ProxyGenerator.

Exception: Failed to parse time string ... giving up time traveling

Hello!

Thank you for this great extension!

However, I'm experiencing some issues with it.

After enabling the extension (without calling any of it's functions) my application crashes with this exception message:

"Warning: TimecopDateTime::__construct(): Failed to parse time string '2044-06-18': giving up time traveling"

However, when I disable the extension, it works OK and \DateTime parses specified value just fine.

What could be the problem?

Thanks!

Do I always have to call timecop::return?

If I use timecop::freeze in a test, do I always have to call timecop::return? (e.g. call in tearDown).

If I run the test without timecop::return, I get a segmentation fault.

#0 0x00005645648f3384 in zend_call_method ()
#1 0x00007fb914ea0c8a in _timecop_datetime_constructor_ex.isra.7 () from /usr/lib64/php/modules/timecop.so
#2 0x00007fb924300dd5 in xdebug_execute_internal () from /usr/lib64/php/modules/xdebug.so
#3 0x00005645646ce7b4 in ZEND_DO_FCALL_SPEC_RETVAL_UNUSED_HANDLER ()
#4 0x000056456495f5a6 in execute_ex ()

(omitted below)
```

apt package?

Is there any debian/ubuntu repo for this? I would love to use it on Ubuntu 18.04, but I currently see no easy way of doing this.

In the end I used the pecl install, but an apt package would still be easier.

PHP8 support?

Getting quite a number of errors when trying to install with PHP 8.2

/tmp/pear/temp/timecop/timecop_php7.c: In function 'get_formatted_mock_time':
/tmp/pear/temp/timecop/php_timecop.h:183:62: error: expected ')' before 'TSRMLS_CC'
  _call_php_method_with_0_params(obj, ce, method_name, retval TSRMLS_CC)

seems like TSRMLS_CC is the issue. Is there any further support for this library for PHP8?

Issue with Homebrew php70-timecop

Hi,

I have been able to install php70-timecop sometime ago, but currently it is giving error.

brew install homebrew/php/php70-timecop        

Updating Homebrew...
Error: homebrew/php was deprecated. This tap is now empty as all its formulae were migrated.

Issue when compiling in osx

Hi,

I'm using PHP 5.6.30 and I wanted to build php-timecop using guide provided in README.md, I encountered following issue

make install
Installing shared extensions:     /usr/lib/php/extensions/no-debug-non-zts-20131226/
cp: /usr/lib/php/extensions/no-debug-non-zts-20131226/#INST@10032#: Operation not permitted
make: *** [install-modules] Error 1

using "sudo make install" does not solve the issue.

Then I installed php-timecop through brew, but it installed php71 as a dependency and now my unit tests are using php71 and fails.

Why the timecop build fails?

also, I needed to install autoconf to be able to run configuration.

brew install autoconf

macOS Sierra, version 10.12.5

Segfault with 7.2.0RC3

No issue with 7.2.0RC2

Related to http://git.php.net/?p=php-src.git;a=commitdiff;h=10a7f2cf6241da934d3b1d441df89a5e3f3d3e5a

(gdb) bt
#0  zend_string_release (s=0x59ca3a48) at /usr/src/debug/php-7.2.0RC3/Zend/zend_string.h:289
#1  zend_function_dtor (zv=<optimized out>) at /usr/src/debug/php-7.2.0RC3/Zend/zend_opcode.c:158
#2  0x000055a33a7bde37 in _zend_hash_del_el_ex (prev=0x0, p=0x55a33b5ae880, idx=879, ht=0x55a33b5993d0) at /usr/src/debug/php-7.2.0RC3/Zend/zend_hash.c:996
#3  zend_hash_str_del (ht=0x55a33b5993d0, str=str@entry=0x7ff1fa738bc0 "timecop_orig_date_create_immutable_from_format", len=46)
    at /usr/src/debug/php-7.2.0RC3/Zend/zend_hash.c:1174
#4  0x00007ff1fa73506e in timecop_func_override_clear () at /work/GIT/php-timecop/timecop_php7.c:638
#5  zm_deactivate_timecop (type=<optimized out>, module_number=<optimized out>) at /work/GIT/php-timecop/timecop_php7.c:393
#6  0x000055a33a7b37a4 in zend_deactivate_modules () at /usr/src/debug/php-7.2.0RC3/Zend/zend_API.c:2637
#7  0x000055a33a746a15 in php_request_shutdown (dummy=<optimized out>) at /usr/src/debug/php-7.2.0RC3/main/main.c:1878
#8  0x000055a33a85fc13 in do_cli (argc=76, argv=0x55a33b598670) at /usr/src/debug/php-7.2.0RC3/sapi/cli/php_cli.c:1178
#9  0x000055a33a602c0b in main (argc=76, argv=0x55a33b598670) at /usr/src/debug/php-7.2.0RC3/sapi/cli/php_cli.c:1404

Feature: timecop_scale() should speed up sleep() and usleep()

I have a function which uses sleep(2)

I wrapped PHPUnit call in following way

if(extension_loaded('timecop')) {
    timecop_scale(1000);
}

$res = $instance->methodUsingSleep();

if(extension_loaded('timecop')) {
    timecop_scale(1);
}

I was wondering why this wasn't speeding up my unit tests, until I looked closer the list of overriden functions.

methodUsingSleep contains code that is using while loop to wait until specific time has passed or one other variable becomes true, I use sleep() to overcome max_execution_time, because in Linux environments (at least) sleep() is not counted as execution time. This allows that while loop to run longer than max_execution_time and wait that one variable to become 'true'.

I was trying to use timecop_scale() to speed up the test :)

Timezone ID '+00:00' resulting in abnormal php notice

When passing a Timezone of '+00:00' (which is valid in normal PHP), while using timecop, it throws an abnormal php notice. This can lead to an exit of the programm depending on your error_reporting setting.

--TEST--
Check timezone '+00:00' being allowed
--SKIPIF--
<?php
$required_func = array("timecop_freeze");
include(__DIR__."/tests-skipcheck.inc.php");
--INI--
date.timezone=America/Los_Angeles
timecop.func_override=1
--FILE--
<?php
$dt1 = new \DateTime('@0', new \DateTimeZone('+00:00'));
var_dump($dt1->format("Y-m-d H:i:s.uP"));

timecop_freeze(0);
$dt2 = new \DateTime('@0', new \DateTimeZone('+00:00'));
var_dump($dt2->format("Y-m-d H:i:s.uP"));
--EXPECT--
string(32) "1970-01-01 00:00:00.000000+00:00"
string(32) "1970-01-01 00:00:00.000000+00:00"

Output of the test:

========OUT========
string(32) "1970-01-01 00:00:00.000000+00:00"

Notice: date_default_timezone_set(): Timezone ID '+00:00' is invalid in ... on line 6
string(32) "1970-01-01 00:00:00.000000+00:00"
========DONE========

========EXP========
string(32) "1970-01-01 00:00:00.000000+00:00"
string(32) "1970-01-01 00:00:00.000000+00:00"
========DONE========

========DIFF========
002+
003+ Notice: date_default_timezone_set(): Timezone ID '+00:00' is invalid in ... on line 6
========DONE========

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.