3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public static $bar = ['foo' => 1, 'bar' => 2]; public static function baz ($name) { return self::$bar[$name]; } } $item = ['name' => 'bar']; $baz = ['bar' => 'baz']; echo Foo::$bar[$item['name']]; echo Foo::$baz[$item['name']]();

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.3.60.0110.00716.38
8.3.50.0030.01016.63
8.3.40.0110.00418.75
8.3.30.0110.00418.59
8.3.20.0040.00420.39
8.3.10.0040.00421.90
8.3.00.0090.00020.83
8.2.180.0070.01118.54
8.2.170.0070.00722.96
8.2.160.0120.00622.12
8.2.150.0050.00224.18
8.2.140.0080.00024.66
8.2.130.0000.00720.56
8.2.120.0030.00526.35
8.2.110.0060.00320.35
8.2.100.0090.00317.97
8.2.90.0080.00019.16
8.2.80.0050.00318.04
8.2.70.0000.01017.75
8.2.60.0060.00318.05
8.2.50.0050.00318.10
8.2.40.0040.00422.32
8.2.30.0050.00320.96
8.2.20.0050.00318.09
8.2.10.0070.00018.05
8.2.00.0040.00418.06
8.1.280.0090.00625.92
8.1.270.0000.00923.96
8.1.260.0060.00326.35
8.1.250.0080.00028.09
8.1.240.0090.00020.84
8.1.230.0000.01118.98
8.1.220.0000.00917.79
8.1.210.0000.00818.77
8.1.200.0000.00917.35
8.1.190.0070.00317.23
8.1.180.0040.00418.10
8.1.170.0030.00618.58
8.1.160.0000.00719.00
8.1.150.0040.00418.87
8.1.140.0030.00619.43
8.1.130.0000.00718.82
8.1.120.0040.00417.33
8.1.110.0070.00017.43
8.1.100.0030.00517.39
8.1.90.0000.00917.38
8.1.80.0030.00517.35
8.1.70.0000.00717.36
8.1.60.0040.00417.41
8.1.50.0030.00617.52
8.1.40.0080.00017.48
8.1.30.0050.00217.64
8.1.20.0060.00317.65
8.1.10.0040.00417.50
8.1.00.0050.00317.43
8.0.300.0000.00718.77
8.0.290.0030.00516.75
8.0.280.0000.00718.35
8.0.270.0050.00217.18
8.0.260.0030.00316.84
8.0.250.0000.00717.02
8.0.240.0030.00516.97
8.0.230.0040.00416.98
8.0.220.0000.00716.92
8.0.210.0000.00816.73
8.0.200.0070.00016.96
8.0.190.0060.00317.01
8.0.180.0000.00816.92
8.0.170.0030.00316.91
8.0.160.0000.00716.78
8.0.150.0040.00416.88
8.0.140.0000.00716.87
8.0.130.0030.00313.30
8.0.120.0000.00816.91
8.0.110.0040.00416.80
8.0.100.0070.00016.70
8.0.90.0040.00416.77
8.0.80.0090.00916.85
8.0.70.0000.00816.70
8.0.60.0000.00716.77
8.0.50.0000.00716.66
8.0.30.0050.01317.18
8.0.20.0130.00917.40
8.0.10.0000.00716.84
8.0.00.0050.01116.74
7.4.330.0000.00515.55
7.4.320.0030.00316.51
7.4.300.0000.00616.59
7.4.290.0000.00616.51
7.4.280.0000.00816.50
7.4.270.0040.00416.35
7.4.260.0030.00313.32
7.4.250.0040.00416.48
7.4.240.0040.00416.40
7.4.230.0000.00716.70
7.4.220.0120.00616.55
7.4.210.0110.00416.46
7.4.200.0000.00716.43
7.4.160.0100.00616.53
7.4.150.0090.01517.40
7.4.140.0090.01317.86
7.4.130.0130.00916.70
7.4.120.0120.00816.45
7.4.110.0030.01316.67
7.4.100.0090.00916.64
7.4.90.0180.00416.52
7.4.80.0090.00919.39
7.4.70.0060.01216.57
7.4.60.0090.00716.32
7.4.50.0080.00316.57
7.4.40.0050.01116.60
7.4.30.0090.00816.26
7.4.00.0070.00715.03
7.3.330.0000.00513.22
7.3.320.0020.00213.43
7.3.310.0030.00316.39
7.3.300.0030.00316.33
7.3.290.0080.00816.35
7.3.280.0100.00716.37
7.3.270.0140.00317.40
7.3.260.0100.00916.46
7.3.250.0100.00916.45
7.3.240.0130.00516.47
7.3.230.0060.01916.29
7.3.210.0140.00316.59
7.3.200.0090.00616.29
7.3.190.0150.00316.43
7.3.180.0170.00016.36
7.3.170.0060.00916.29
7.3.160.0130.01016.36
7.2.330.0090.00916.68
7.2.320.0030.01416.71
7.2.310.0110.00616.64
7.2.300.0070.01016.68
7.2.290.0030.01416.73
7.2.60.0070.00716.87
7.2.00.0120.00619.25
7.1.200.0000.01315.47
7.1.100.0000.01117.84
7.1.70.0030.00517.14
7.1.60.1270.01333.14
7.1.50.0330.01733.08
7.1.40.0200.01332.46
7.1.30.0270.01332.48
7.1.20.0200.01032.64
7.1.10.0300.00014.68
7.1.00.0200.01014.86
7.0.200.0070.01314.92
7.0.190.0270.00714.83
7.0.180.0200.00714.51
7.0.170.0230.00314.62
7.0.160.0200.00714.29
7.0.150.0070.00314.31
7.0.140.0200.01014.42
7.0.130.0300.01014.61
7.0.120.0030.01014.77
7.0.110.0170.01014.38
7.0.100.0230.00714.47
7.0.90.0230.00714.34
7.0.80.0170.01014.47
7.0.70.0670.00714.59
7.0.60.0200.01014.16
7.0.50.0170.01014.38
7.0.40.0170.01314.66
7.0.30.0400.01014.64
7.0.20.0230.00314.71
7.0.10.0200.00714.77
7.0.00.0170.01014.76

preferences:
36.64 ms | 401 KiB | 5 Q