You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 24, 2022. It is now read-only.
root@19da4cbeb2d9:/app/src# php -v
PHP 8.0.8 (cli) (built: Jul 1 2021 22:40:15) ( NTS )
Copyright (c) The PHP Group
Zend Engine v4.0.8, Copyright (c) Zend Technologies
with Zend OPcache v8.0.8, Copyright (c), by Zend Technologies
with Xdebug v3.1.0beta2, Copyright (c) 2002-2021, by Derick Rethans
<?phprequire('../vendor/autoload.php');
$date = new \DateTime();
$immutable = \Safe\DateTimeImmutable::createFromMutable($date);
results in:
Fatal error: Uncaught Error: Call to a member function format() on null in /app/vendor/thecodingmachine/safe8/lib/DateTimeImmutable.php:75
Stack trace:
#0 /app/vendor/thecodingmachine/safe8/lib/DateTimeImmutable.php(38): Safe\DateTimeImmutable->format('Y-m-d H:i:s.u')
#1 /app/vendor/thecodingmachine/safe8/lib/DateTimeImmutable.php(241): Safe\DateTimeImmutable::createFromRegular(Object(Safe\DateTimeImmutable))
#2 /app/src/test.php(5): Safe\DateTimeImmutable::createFromMutable(Object(DateTime))
#3 {main}
thrown in /app/vendor/thecodingmachine/safe8/lib/DateTimeImmutable.php on line 75