3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public function bar() { return 'bar'; } } $services = []; function foo() { global $services; return $services['foo'] = new Foo(); } // $services['foo'] = new Foo(); echo (isset($services['foo']) ? $services['foo'] : foo())->bar();

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.0140.00718.39
8.3.50.0140.00418.04
8.3.40.0060.00919.02
8.3.30.0000.01418.85
8.3.20.0040.00419.28
8.3.10.0040.00423.66
8.3.00.0040.00420.84
8.2.180.0180.00318.06
8.2.170.0110.00422.96
8.2.160.0070.00722.13
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0040.00421.12
8.2.120.0080.00026.35
8.2.110.0100.00021.07
8.2.100.0080.00418.03
8.2.90.0000.00918.16
8.2.80.0050.00517.97
8.2.70.0000.00818.05
8.2.60.0070.00318.34
8.2.50.0040.00418.10
8.2.40.0000.00821.38
8.2.30.0040.00419.18
8.2.20.0000.00718.06
8.2.10.0040.00417.92
8.2.00.0000.00819.39
8.1.280.0120.00625.92
8.1.270.0050.00322.14
8.1.260.0060.00326.35
8.1.250.0000.00828.09
8.1.240.0070.00420.87
8.1.230.0040.00820.94
8.1.220.0060.00317.74
8.1.210.0000.00818.77
8.1.200.0060.00617.25
8.1.190.0080.00017.23
8.1.180.0030.00618.10
8.1.170.0040.00418.66
8.1.160.0040.00418.82
8.1.150.0030.00518.82
8.1.140.0040.00422.13
8.1.130.0070.00020.00
8.1.120.0000.00717.29
8.1.110.0050.00317.28
8.1.100.0080.00317.29
8.1.90.0040.00417.36
8.1.80.0030.00517.37
8.1.70.0000.00717.38
8.1.60.0100.00317.56
8.1.50.0050.00317.57
8.1.40.0040.00417.52
8.1.30.0090.00017.56
8.1.20.0000.00817.53
8.1.10.0040.00417.47
8.1.00.0080.00017.49
8.0.300.0000.00720.03
8.0.290.0000.00716.63
8.0.280.0080.00018.43
8.0.270.0070.00017.25
8.0.260.0040.00418.44
8.0.250.0030.00316.96
8.0.240.0060.00316.97
8.0.230.0000.00716.85
8.0.220.0030.00316.66
8.0.210.0000.00716.83
8.0.200.0030.00316.90
8.0.190.0040.00416.94
8.0.180.0000.00816.73
8.0.170.0040.00416.87
8.0.160.0040.00416.79
8.0.150.0070.00016.83
8.0.140.0030.00616.73
8.0.130.0050.00013.26
8.0.120.0030.00516.62
8.0.110.0040.00416.94
8.0.100.0080.00016.87
8.0.90.0000.00816.69
8.0.80.0070.01116.83
8.0.70.0000.00716.66
8.0.60.0040.00416.77
8.0.50.0040.00416.70
8.0.30.0080.00817.12
8.0.20.0120.01717.40
8.0.10.0040.00416.89
8.0.00.0110.01216.55
7.4.330.0020.00215.55
7.4.320.0030.00316.55
7.4.300.0000.00716.59
7.4.290.0000.00716.34
7.4.280.0000.00816.57
7.4.270.0030.00316.59
7.4.260.0030.00316.50
7.4.250.0000.00816.57
7.4.240.0070.00016.49
7.4.230.0070.00016.63
7.4.220.0050.00216.62
7.4.210.0110.00516.51
7.4.200.0030.00316.39
7.4.160.0090.00816.50
7.4.140.0090.00917.86
7.4.130.0090.00916.58
7.4.120.0070.01116.58
7.4.110.0100.01316.51
7.4.100.0110.00616.54
7.4.90.0060.01016.41
7.4.80.0040.01419.39
7.4.70.0140.00716.54
7.4.60.0100.00616.46
7.4.50.0050.00616.49
7.4.40.0100.00716.52
7.4.00.0070.01014.80
7.3.330.0030.00313.32
7.3.320.0000.00513.39
7.3.310.0040.00416.36
7.3.300.0060.00016.32
7.3.290.0000.00616.30
7.3.280.0050.01216.32
7.3.260.0050.01216.55
7.3.240.0090.00916.43
7.3.230.0030.01416.36
7.3.210.0030.01516.27
7.3.200.0090.01316.35
7.3.190.0090.00916.54
7.3.180.0060.00916.46
7.3.170.0060.01716.59
7.3.160.0080.00816.35
7.2.330.0090.00916.68
7.2.320.0080.01216.55
7.2.310.0070.01116.32
7.2.300.0100.01316.67
7.2.290.0030.01416.73
7.2.120.0830.00515.38
7.2.110.0520.01115.37
7.2.100.0660.00715.23
7.2.90.0090.00915.50
7.2.80.0110.00515.58
7.2.70.0420.00415.73
7.2.60.0600.00615.92
7.2.50.0110.01115.77
7.2.40.0100.00915.76
7.2.30.0140.01115.75
7.2.20.0110.00815.54
7.2.10.1170.01115.83
7.2.00.0600.00515.61
7.1.240.0590.00814.58
7.1.230.1010.00814.83
7.1.220.0520.00714.66
7.1.210.0060.00814.77
7.1.200.0400.00814.79
7.1.190.0350.00414.89
7.1.180.0640.01414.68
7.1.170.0850.00814.85
7.1.160.0100.00714.83
7.1.150.0090.01014.74
7.1.140.1140.00414.73
7.1.130.0480.01214.65
7.1.120.0140.00814.63
7.1.110.0250.01014.55
7.1.100.0060.01214.86
7.1.90.0150.00814.79
7.1.80.0190.00614.86
7.1.70.0150.00614.86
7.1.60.0400.00714.81
7.1.50.0200.00514.62
7.1.40.0070.00614.78
7.1.30.0390.00514.56
7.1.20.0090.00814.66
7.1.10.0130.00314.47
7.1.00.0040.01114.68
5.6.380.0050.01113.95

preferences:
59.14 ms | 401 KiB | 5 Q