3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types = 1); $a = [1233=>true]; /** * @param array<int, bool> $a */ function a(array $a): void { $l = (string) array_key_last($a); !function_exists('\PHPStan\dumpType')?:\PHPStan\dumpType($l); $s = substr($l, 0, 2); !function_exists('\PHPStan\dumpType')?:\PHPStan\dumpType($s); if ($s === '') { ; } else { var_dump($s); } } a($a);

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.30.0050.00319.58
8.5.20.0100.00819.68
8.5.10.0110.00620.22
8.5.00.0150.00719.98
8.4.180.0140.00922.00
8.4.170.0180.00519.59
8.4.160.0160.01023.86
8.4.150.0030.00014.05
8.4.140.0100.01117.31
8.4.130.0130.00717.72
8.4.120.0100.00620.73
8.4.110.0110.00922.65
8.4.100.0100.01117.59
8.4.90.0050.00318.76
8.4.80.0080.00917.57
8.4.70.0110.00917.80
8.4.60.0110.00918.39
8.4.50.0070.00217.55
8.4.40.0140.00719.57
8.4.30.0040.01118.60
8.4.20.0040.00426.05
8.4.10.0060.01023.83
8.3.300.0090.00720.23
8.3.290.0130.00820.82
8.3.280.0120.00720.08
8.3.270.0110.01016.39
8.3.260.0130.00816.37
8.3.250.0120.00718.84
8.3.240.0120.00816.70
8.3.230.0050.00316.41
8.3.220.0060.00217.34
8.3.210.0040.00316.54
8.3.200.0030.00616.59
8.3.190.0050.00316.98
8.3.180.0050.00316.63
8.3.170.0090.00617.21
8.3.160.0120.00316.33
8.3.150.0060.01217.36
8.3.140.0060.00320.89
8.3.130.0050.00318.21
8.3.120.0120.00618.80
8.3.110.0000.00916.50
8.3.100.0060.00624.06
8.3.90.0050.00318.58
8.3.80.0040.00418.56
8.3.70.0120.00318.30
8.3.60.0070.01116.50
8.3.50.0120.00316.55
8.3.40.0070.00719.91
8.3.30.0040.01118.71
8.3.20.0050.00324.18
8.3.10.0000.00824.66
8.3.00.0080.00026.16
8.2.300.0080.01118.87
8.2.290.0100.00820.39
8.2.280.0110.00618.43
8.2.270.0110.00717.20
8.2.260.0090.00918.98
8.2.250.0060.00316.40
8.2.240.0120.00318.87
8.2.230.0080.00020.94
8.2.220.0070.00737.54
8.2.210.0060.00326.77
8.2.200.0060.00318.16
8.2.190.0120.00618.48
8.2.180.0080.00816.63
8.2.170.0080.00818.97
8.2.160.0150.00022.96
8.2.150.0040.00425.66
8.2.140.0080.00024.66
8.2.130.0080.00026.16
8.2.120.0040.00421.04
8.2.110.0030.00621.11
8.2.100.0070.00417.72
8.2.90.0080.00017.91
8.2.80.0000.00817.97
8.2.70.0000.00817.93
8.2.60.0080.00317.91
8.2.50.0050.00318.10
8.2.40.0030.00619.33
8.2.30.0080.00019.31
8.2.20.0000.00719.13
8.2.10.0050.00218.13
8.2.00.0000.01120.65
8.1.340.0090.01017.38
8.1.330.0060.01220.32
8.1.320.0130.00516.04
8.1.310.0030.01416.53
8.1.300.0030.00619.57
8.1.290.0070.00318.88
8.1.280.0040.01125.92
8.1.270.0070.00024.66
8.1.260.0040.00426.35
8.1.250.0000.00828.09
8.1.240.0060.00322.19
8.1.230.0040.00822.63
8.1.220.0000.00817.74
8.1.210.0060.00320.19
8.1.200.0080.00017.22
8.1.190.0040.00417.23
8.1.180.0050.00318.10
8.1.170.0050.00318.65
8.1.160.0030.00719.00
8.1.150.0000.00818.54
8.1.140.0040.00417.40
8.1.130.0030.00620.47
8.1.120.0090.00918.57
8.1.110.0110.00618.61
8.1.100.0170.00018.74
8.1.90.0140.00218.70
8.1.80.0130.00018.59
8.1.70.0040.00818.70
8.1.60.0070.00318.83
8.1.50.0130.00618.64
8.1.40.0140.00018.88
8.1.30.0080.00318.82
8.1.20.0100.00018.88
8.1.10.0070.00718.71
8.1.00.0120.00618.60
8.0.300.0060.00321.95
8.0.290.0060.00316.75
8.0.280.0000.00718.36
8.0.270.0000.00717.91
8.0.260.0090.00418.10
8.0.250.0090.00518.06
8.0.240.0000.01218.09
8.0.230.0140.00018.00
8.0.220.0080.00418.02
8.0.210.0030.00519.70
8.0.200.0000.01019.90
8.0.190.0050.00519.86
8.0.180.0060.00319.79
8.0.170.0050.00519.76
8.0.160.0000.01019.74
8.0.150.0060.00419.82
8.0.140.0030.00719.82
8.0.130.0080.00219.79
8.0.120.0090.00019.79
8.0.110.0040.00419.67
8.0.100.0110.00317.89
8.0.90.0060.01117.99
8.0.80.0130.00317.92
8.0.70.0160.00018.04
8.0.60.0080.00817.99
8.0.50.0150.00018.00
8.0.30.0150.00217.89
8.0.20.0110.00617.93
8.0.10.0160.00418.03

preferences:
127.65 ms | 475 KiB | 5 Q