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 git.master_jit, git.master
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.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
28.13 ms | 405 KiB | 5 Q