1
0
mirror of https://github.com/php/php-src.git synced 2026-04-19 14:01:01 +02:00
Files
archived-php-src/ext/opcache/tests/bug75556.phpt
Max Semenik e9f783fcdd Migrate skip checks to --EXTENSIONS--, p3
For rationale, see #6787

Extensions migrated in part 3:
* ftp
* gmp
* iconv
* opcache
* shmop
2021-04-03 15:23:25 +02:00

27 lines
603 B
PHP

--TEST--
Bug #75556 (Invalid opcode 138/1/1)
--INI--
opcache.enable=1
opcache.enable_cli=1
opcache.optimization_level=-1
--EXTENSIONS--
opcache
--FILE--
<?php
function createFromFormat($format, $date, ?\DateTimeZone $tz = null): ?\DateTimeInterface
{
if ($tz !== null
|| ($tz instanceof \DateTimeZone && !in_array($tz->getName(), ['UTC', 'Z'], true))
) {
$msg = 'Date objects must have UTC as their timezone';
throw new \UnexpectedValueException($msg);
}
return null;
}
var_dump(createFromFormat('m/d/Y', '12/07/2017', null));
?>
--EXPECT--
NULL