3v4l.org

run code in 500+ 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();

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
8.5.80.0100.00716.82
8.5.70.0080.00618.80
8.5.60.0070.00817.03
8.5.50.0080.00516.80
8.5.30.0120.00518.14
8.5.20.0110.00819.38
8.5.10.0110.00716.67
8.5.00.0140.00719.97
8.4.230.0070.00319.60
8.4.220.0050.00519.59
8.4.210.0060.00321.33
8.4.180.0150.00719.91
8.4.170.0140.00920.25
8.4.160.0110.01222.04
8.4.150.0070.00616.96
8.4.140.0110.01017.57
8.4.130.0100.01117.77
8.4.120.0050.00320.55
8.4.110.0130.00718.22
8.4.100.0060.00517.79
8.4.90.0060.00320.50
8.4.80.0120.00618.83
8.4.70.0080.00420.42
8.4.60.0160.00420.92
8.4.50.0320.00919.40
8.4.40.0320.00817.81
8.4.30.0260.00517.30
8.4.20.0190.00417.74
8.4.10.0170.00517.66
8.3.320.0140.00618.66
8.3.310.0030.00620.51
8.3.300.0090.01120.83
8.3.290.0070.00220.82
8.3.280.0130.00718.66
8.3.270.0100.01016.44
8.3.260.0100.01016.67
8.3.250.0120.00619.02
8.3.240.0110.00816.57
8.3.230.0140.00516.52
8.3.220.0060.00218.70
8.3.210.0120.00716.54
8.3.200.0050.00416.23
8.3.190.0160.00316.80
8.3.180.0130.00418.67
8.3.170.0170.00316.37
8.3.160.0160.00616.62
8.3.150.0160.00618.14
8.3.140.0170.00516.79
8.3.130.0130.00716.27
8.3.120.0170.00316.77
8.3.110.0140.00416.53
8.3.100.0070.00216.41
8.3.90.0170.00316.48
8.3.80.0160.00416.41
8.3.70.0160.00416.43
8.3.60.0180.00316.55
8.3.50.0170.00416.57
8.3.40.0160.00217.11
8.3.30.0140.00417.32
8.3.20.0140.00417.56
8.3.10.0140.00317.48
8.3.00.0080.00517.15
8.2.310.0120.00718.29
8.2.300.0100.00920.32
8.2.290.0060.00217.00
8.2.280.0050.00418.52
8.2.270.0110.00616.90
8.2.260.0150.00216.63
8.2.250.0120.00516.32
8.2.240.0130.00516.21
8.2.230.0080.00816.45
8.2.220.0130.00616.71
8.2.210.0150.00216.39
8.2.200.0150.00216.73
8.2.190.0140.00516.38
8.2.180.0100.00716.24
8.2.170.0150.00417.62
8.2.160.0140.00417.54
8.2.150.0120.00717.41
8.2.140.0170.00217.61
8.2.130.0140.00517.37
8.2.120.0170.01017.66
8.2.110.0210.01017.25
8.2.100.0330.01117.42
8.2.90.0280.00517.43
8.2.80.0170.00317.43
8.2.70.0180.00417.46
8.2.60.0210.00417.45
8.2.50.0200.00517.38
8.2.40.0140.00517.55
8.2.30.0260.00617.26
8.2.20.0210.01117.50
8.2.10.0160.00217.67
8.2.00.0210.00817.49
8.1.340.0100.01220.43
8.1.320.0070.01118.02

preferences:
42.63 ms | 907 KiB | 5 Q