3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types = 1); namespace aaa; class Foo { public function sayHello(): void { $expectedDaysResult = [ '2019-01-04' => [ '17:00', 'evening', ], '2019-01-05' => [ '07:00', 'morning', ], '2019-01-06' => [ '12:00', 'afternoon', ], '2019-01-07' => [ '10:00', '11:00', '12:00', '13:00', '14:00', '15:00', '16:00', '17:00', 'morning', 'afternoon', 'evening', ], '2019-01-08' => [ '07:00', '08:00', '13:00', '19:00', 'morning', 'afternoon', 'evening', ], 'anyDay' => [ '07:00', '08:00', '10:00', '11:00', '12:00', '13:00', '14:00', '15:00', '16:00', '17:00', '19:00', 'morning', 'afternoon', 'evening', ], ]; $actualEnabledDays = $this->getEnabledDays(); assert(count($expectedDaysResult) === $actualEnabledDays); \PHPStan\dumpType($actualEnabledDays); } /** * @return array<string, array<int, string>> */ private function getEnabledDays(): array { return []; } } (new Foo())->sayHello();
Output for 8.1.32, 8.2.0 - 8.2.29, 8.3.0 - 8.3.28, 8.4.1 - 8.4.14, 8.5.0
Fatal error: Uncaught AssertionError: assert(count($expectedDaysResult) === $actualEnabledDays) in /in/k2LU5:63 Stack trace: #0 /in/k2LU5(63): assert(false, 'assert(count($e...') #1 /in/k2LU5(76): aaa\Foo->sayHello() #2 {main} thrown in /in/k2LU5 on line 63
Process exited with code 255.
Output for 8.4.15
/bin/php-8.4.15: /usr/lib/libm.so.6: version `GLIBC_2.38' not found (required by /bin/php-8.4.15) /bin/php-8.4.15: /usr/lib/libm.so.6: version `GLIBC_2.35' not found (required by /bin/php-8.4.15) /bin/php-8.4.15: /usr/lib/libc.so.6: version `GLIBC_2.34' not found (required by /bin/php-8.4.15) /bin/php-8.4.15: /usr/lib/libc.so.6: version `GLIBC_2.38' not found (required by /bin/php-8.4.15)
Process exited with code 1.

preferences:
67.86 ms | 407 KiB | 5 Q