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']]($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.0070.01116.38
8.3.50.0040.01116.08
8.3.40.0070.00718.95
8.3.30.0040.01118.79
8.3.20.0040.00420.34
8.3.10.0070.00021.91
8.3.00.0050.00320.80
8.2.180.0140.00418.64
8.2.170.0040.01122.96
8.2.160.0110.00322.09
8.2.150.0080.00024.18
8.2.140.0090.00024.66
8.2.130.0040.00420.52
8.2.120.0090.00026.35
8.2.110.0060.00320.34
8.2.100.0040.00817.82
8.2.90.0040.00419.12
8.2.80.0000.00918.04
8.2.70.0040.00417.75
8.2.60.0060.00318.05
8.2.50.0000.00918.10
8.2.40.0000.00822.34
8.2.30.0050.00321.03
8.2.20.0000.00718.18
8.2.10.0040.00417.99
8.2.00.0040.00417.93
8.1.280.0070.00725.92
8.1.270.0080.00023.99
8.1.260.0070.00026.35
8.1.250.0050.00228.09
8.1.240.0100.00020.86
8.1.230.0070.00419.16
8.1.220.0030.00617.74
8.1.210.0000.00918.77
8.1.200.0060.00317.36
8.1.190.0030.00617.22
8.1.180.0000.00918.10
8.1.170.0090.00018.51
8.1.160.0040.00418.97
8.1.150.0040.00418.89
8.1.140.0050.00319.56
8.1.130.0030.00318.79
8.1.120.0040.00417.44
8.1.110.0000.00717.43
8.1.100.0040.00417.30
8.1.90.0040.00417.45
8.1.80.0050.00317.40
8.1.70.0030.00317.40
8.1.60.0030.00517.56
8.1.50.0000.00717.43
8.1.40.0000.00817.52
8.1.30.0000.00717.59
8.1.20.0070.00017.68
8.1.10.0040.00417.48
8.1.00.0070.00017.53
8.0.300.0000.00718.77
8.0.290.0000.00716.75
8.0.280.0040.00418.43
8.0.270.0030.00517.27
8.0.260.0000.00716.79
8.0.250.0000.00717.04
8.0.240.0000.00916.94
8.0.230.0040.00416.82
8.0.220.0030.00316.93
8.0.210.0030.00316.87
8.0.200.0000.00616.83
8.0.190.0050.00516.98
8.0.180.0060.00316.93
8.0.170.0070.00016.91
8.0.160.0080.00016.93
8.0.150.0040.00416.82
8.0.140.0000.00816.88
8.0.130.0060.00013.33
8.0.120.0000.00716.90
8.0.110.0000.00816.91
8.0.100.0000.00716.89
8.0.90.0000.00716.86
8.0.80.0070.01016.96
8.0.70.0000.00716.91
8.0.60.0030.00517.01
8.0.50.0050.00216.96
8.0.30.0090.01016.99
8.0.20.0110.00917.40
8.0.10.0040.00416.86
8.0.00.0070.01016.72
7.4.330.0030.00315.55
7.4.320.0030.00316.43
7.4.300.0030.00316.52
7.4.290.0030.00316.52
7.4.280.0000.00816.60
7.4.270.0020.00516.58
7.4.260.0070.00013.31
7.4.250.0000.00716.57
7.4.240.0030.00316.43
7.4.230.0030.00516.47
7.4.220.0060.01216.47
7.4.210.0000.01416.71
7.4.200.0040.00416.35
7.4.160.0160.00116.45
7.4.150.0110.00717.40
7.4.140.0080.01117.86
7.4.130.0130.00716.49
7.4.120.0110.01016.58
7.4.110.0100.00616.48
7.4.100.0110.00816.58
7.4.90.0090.00916.55
7.4.80.0070.01019.39
7.4.70.0070.01016.58
7.4.60.0060.00916.52
7.4.50.0050.00816.45
7.4.40.0070.01016.36
7.4.30.0150.00316.40
7.4.00.0070.00714.96
7.3.330.0000.00513.19
7.3.320.0070.00013.15
7.3.310.0040.00416.36
7.3.300.0000.00716.38
7.3.290.0070.00816.34
7.3.280.0150.00916.35
7.3.270.0030.01417.40
7.3.260.0100.00816.46
7.3.250.0070.01216.41
7.3.240.0100.00716.32
7.3.230.0150.00316.33
7.3.210.0090.00916.46
7.3.200.0080.00816.34
7.3.190.0090.00916.44
7.3.180.0130.01016.51
7.3.170.0140.00416.41
7.3.160.0040.01416.41
7.2.330.0180.00316.60
7.2.320.0120.00616.71
7.2.310.0070.01116.66
7.2.300.0070.01116.46
7.2.290.0030.01816.75
7.2.60.0030.01016.86
7.2.00.0130.00719.36
7.1.200.0040.01115.54
7.1.100.0050.00518.17
7.1.70.0030.00316.80
7.1.60.0330.01033.07
7.1.50.0270.01732.85
7.1.40.0570.02032.52
7.1.30.0430.01732.55
7.1.20.0530.01332.85
7.1.10.0200.01314.55
7.1.00.0200.01314.69
7.0.200.0200.01015.09
7.0.190.0300.01014.88
7.0.180.0330.01714.11
7.0.170.1030.01014.30
7.0.160.0370.01014.16
7.0.150.0030.01014.46
7.0.140.0000.01314.34
7.0.130.0070.00714.76
7.0.120.0230.00714.64
7.0.110.0330.01014.35
7.0.100.0030.01014.71
7.0.90.0370.01714.63
7.0.80.0500.01014.53
7.0.70.0370.01314.59
7.0.60.1000.01014.14
7.0.50.0300.00714.37
7.0.40.0330.01014.77
7.0.30.0330.00714.65
7.0.20.0330.00714.57
7.0.10.0430.01014.30
7.0.00.0270.01314.47

preferences:
28.55 ms | 401 KiB | 5 Q