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()) && false ?: '_'}->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.5.10.0130.00816.87
8.5.00.0150.00619.96
8.4.160.0140.00919.84
8.4.150.0020.00014.05
8.4.140.0130.00717.79
8.4.130.0100.00917.98
8.4.120.0080.01120.52
8.4.110.0080.01122.58
8.4.100.0100.00718.10
8.4.90.0150.00618.47
8.4.80.0050.00417.71
8.4.70.0060.00317.88
8.4.60.0120.00818.66
8.4.50.0110.00919.59
8.4.40.0070.01319.57
8.4.30.0170.00019.80
8.4.20.0120.00920.58
8.4.10.0100.01017.57
8.3.280.0140.00618.60
8.3.270.0140.00516.71
8.3.260.0110.00816.59
8.3.250.0090.00918.97
8.3.240.0060.01016.57
8.3.230.0150.00416.61
8.3.220.0090.00917.27
8.3.210.0110.01016.88
8.3.200.0020.00716.69
8.3.190.0070.01117.07
8.3.180.0050.00416.78
8.3.170.0140.00419.06
8.3.160.0080.00016.75
8.3.150.0060.01218.95
8.3.140.0040.01116.56
8.3.130.0060.00316.68
8.3.120.0030.00720.79
8.3.110.0120.00316.75
8.3.100.0100.01024.06
8.3.90.0120.00326.77
8.3.80.0060.00318.33
8.3.70.0110.00416.75
8.3.60.0030.01318.55
8.3.50.0090.00718.32
8.3.40.0140.00318.84
8.3.30.0100.00518.74
8.3.20.0080.00019.28
8.3.10.0070.00023.68
8.3.00.0070.01119.14
8.2.290.0110.00720.50
8.2.280.0070.00418.33
8.2.270.0040.01517.04
8.2.260.0100.00718.92
8.2.250.0160.00317.11
8.2.240.0100.00717.31
8.2.230.0060.00320.94
8.2.220.0030.00637.54
8.2.210.0080.00026.77
8.2.200.0070.00316.63
8.2.190.0100.01018.78
8.2.180.0100.01318.29
8.2.170.0030.01018.96
8.2.160.0060.00622.25
8.2.150.0070.00024.18
8.2.140.0000.00824.66
8.2.130.0040.00421.00
8.2.120.0080.00026.35
8.2.110.0070.00420.39
8.2.100.0060.00617.84
8.2.90.0000.00917.88
8.2.80.0040.00418.95
8.2.70.0030.00517.93
8.2.60.0000.00718.03
8.2.50.0040.00418.10
8.2.40.0000.00719.46
8.2.30.0100.00019.43
8.2.20.0000.00718.06
8.2.10.0050.00218.22
8.2.00.0000.00719.40
8.1.330.0110.00620.43
8.1.320.0100.00816.33
8.1.310.0060.00316.91
8.1.300.0040.00418.48
8.1.290.0060.00330.84
8.1.280.0090.00925.92
8.1.270.0000.00722.02
8.1.260.0040.00426.35
8.1.250.0060.00328.09
8.1.240.0040.00422.03
8.1.230.0040.00817.95
8.1.220.0050.00517.77
8.1.210.0060.00318.77
8.1.200.0030.00617.25
8.1.190.0090.00017.65
8.1.180.0030.00518.10
8.1.170.0030.00518.56
8.1.160.0050.00318.91
8.1.150.0050.00218.84
8.1.140.0000.00722.16
8.1.130.0000.00721.91
8.1.120.0040.00417.37
8.1.110.0000.00717.48
8.1.100.0040.00417.47
8.1.90.0030.00417.36
8.1.80.0040.00417.36
8.1.70.0040.00417.41
8.1.60.0060.00317.58
8.1.50.0000.00817.55
8.1.40.0040.00417.50
8.1.30.0040.00417.64
8.1.20.0060.00317.70
8.1.10.0070.00017.45
8.1.00.0040.00417.55
8.0.300.0070.00018.77
8.0.290.0030.00516.75
8.0.280.0000.00818.37
8.0.270.0050.00217.27
8.0.260.0000.00618.45
8.0.250.0000.00717.04
8.0.240.0040.00417.00
8.0.230.0000.00717.05
8.0.220.0070.00016.98
8.0.210.0000.00816.94
8.0.200.0040.00417.00
8.0.190.0080.00016.95
8.0.180.0030.00516.98
8.0.170.0050.00316.95
8.0.160.0050.00517.01
8.0.150.0070.00017.01
8.0.140.0000.00816.91
8.0.130.0050.00013.40
8.0.120.0000.00816.80
8.0.110.0040.00417.00
8.0.100.0070.00016.84
8.0.90.0000.00716.85
8.0.80.0070.01617.03
8.0.70.0040.00416.92
8.0.60.0070.00017.03
8.0.50.0070.00017.04
8.0.30.0040.01517.18
8.0.20.0130.00917.40
8.0.10.0040.00417.09
8.0.00.0100.00916.80
7.4.330.0050.00015.55
7.4.320.0000.00616.55
7.4.300.0000.00616.59
7.4.290.0030.00316.61
7.4.280.0060.00316.52
7.4.270.0000.00716.51
7.4.260.0000.00716.50
7.4.250.0030.00316.50
7.4.240.0040.00416.63
7.4.230.0030.00516.46
7.4.220.0030.00616.49
7.4.210.0010.01416.55
7.4.200.0000.00716.72
7.4.160.0090.01016.55
7.4.140.0090.00917.86
7.4.130.0110.00716.61
7.4.120.0110.00816.47
7.4.110.0160.00916.65
7.4.100.0100.01316.55
7.4.90.0110.00616.67
7.4.80.0130.01019.39
7.4.70.0090.01316.30
7.4.60.0090.00916.49
7.4.50.0030.01116.66
7.4.40.0070.01016.51
7.4.00.0100.00715.21
7.3.330.0000.00613.41
7.3.320.0060.00013.46
7.3.310.0020.00516.29
7.3.300.0030.00316.44
7.3.290.0030.00316.43
7.3.280.0060.01016.37
7.3.260.0080.00916.39
7.3.240.0070.01116.50
7.3.230.0060.01716.61
7.3.210.0160.00816.32
7.3.200.0110.01116.58
7.3.190.0070.01316.18
7.3.180.0090.00816.45
7.3.170.0130.00716.44
7.3.160.0100.00716.45
7.3.00.0330.00614.90
7.2.330.0110.00616.81
7.2.320.0000.01816.83
7.2.310.0070.01016.82
7.2.300.0040.01716.64
7.2.290.0130.01016.55
7.2.130.0260.00914.77
7.2.120.0230.00315.73
7.2.110.0220.00315.62
7.2.100.0260.00215.46
7.2.90.0230.00515.87
7.2.80.0240.00515.66
7.2.70.0210.00515.93
7.2.60.0190.00915.87
7.2.50.0190.00515.77
7.2.40.0230.00815.94
7.2.30.0160.00715.88
7.2.20.0170.00815.80
7.2.10.0190.00815.94
7.2.00.0250.00615.82
7.1.250.0430.00013.82
7.1.240.0240.00614.64
7.1.230.0210.00714.74
7.1.220.0200.00714.65
7.1.210.0180.01014.57
7.1.200.0180.01014.48
7.1.190.0220.00814.47
7.1.180.0190.00714.39
7.1.170.0230.00314.73
7.1.160.0240.00914.77
7.1.150.0250.00314.73
7.1.140.0220.00814.72
7.1.130.0490.01014.62
7.1.120.0260.00514.86
7.1.110.0290.00214.83
7.1.100.0330.00714.91
7.1.90.0310.00514.59
7.1.80.0220.00814.96
7.1.70.0250.00914.82
7.1.60.0230.00614.91
7.1.50.0280.00414.71
7.1.40.0170.01114.61
7.1.30.0300.00414.72
7.1.20.0220.00714.76
7.1.10.0240.00514.83
7.1.00.0160.01314.83
7.0.330.0380.00713.46
5.6.380.0110.00514.20

preferences:
37.86 ms | 403 KiB | 5 Q