3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { public function __construct() { $this->func = function() { return array( 'a' => 1, 'b' => 10, ); }; } public function __get($k) { $func = $this->func; return $func(); } } $a = new A; var_dump($a->test['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.3.60.0110.00418.37
8.3.50.0090.01222.04
8.3.40.0110.00418.63
8.3.30.0040.01119.02
8.3.20.0070.00020.34
8.3.10.0000.00721.92
8.3.00.0040.00422.51
8.2.180.0040.01116.75
8.2.170.0120.00322.96
8.2.160.0060.00920.98
8.2.150.0040.00424.18
8.2.140.0000.00824.66
8.2.130.0040.00426.16
8.2.120.0000.00819.49
8.2.110.0030.00722.25
8.2.100.0030.00918.03
8.2.90.0050.00319.22
8.2.80.0080.00018.16
8.2.70.0040.00417.50
8.2.60.0040.00417.80
8.2.50.0050.00318.07
8.2.40.0040.00418.34
8.2.30.0070.00318.13
8.2.20.0000.00817.60
8.2.10.0050.00317.82
8.2.00.0030.00517.64
8.1.280.0170.00325.92
8.1.270.0080.00022.04
8.1.260.0050.00326.35
8.1.250.0080.00028.09
8.1.240.0090.00022.20
8.1.230.0070.00719.00
8.1.220.0040.00417.79
8.1.210.0040.00418.77
8.1.200.0030.00717.35
8.1.190.0030.00517.55
8.1.180.0000.00818.10
8.1.170.0000.00818.66
8.1.160.0040.00421.89
8.1.150.0070.00018.55
8.1.140.0000.00717.46
8.1.130.0040.00417.76
8.1.120.0070.00017.52
8.1.110.0000.00817.45
8.1.100.0000.00817.29
8.1.90.0000.00717.45
8.1.80.0000.00717.52
8.1.70.0040.00417.36
8.1.60.0050.00317.51
8.1.50.0040.00417.50
8.1.40.0070.00017.42
8.1.30.0000.00717.61
8.1.20.0000.00817.54
8.1.10.0040.00417.53
8.1.00.0040.00417.39
8.0.300.0090.00018.77
8.0.290.0040.00417.05
8.0.280.0030.00318.39
8.0.270.0030.00317.17
8.0.260.0000.00716.70
8.0.250.0070.00016.91
8.0.240.0040.00416.89
8.0.230.0060.00316.91
8.0.220.0070.00016.84
8.0.210.0030.00316.82
8.0.200.0000.00616.92
8.0.190.0050.00316.87
8.0.180.0070.00016.91
8.0.170.0040.00416.89
8.0.160.0070.00016.89
8.0.150.0000.00716.76
8.0.140.0040.00416.90
8.0.130.0050.00013.29
8.0.120.0050.00516.85
8.0.110.0000.00716.86
8.0.100.0070.00016.88
8.0.90.0040.00416.89
8.0.80.0070.00816.96
8.0.70.0040.00416.86
8.0.60.0040.00416.89
8.0.50.0000.00716.91
8.0.30.0130.00917.06
8.0.20.0100.01017.40
8.0.10.0000.00716.98
8.0.00.0080.01016.68
7.4.330.0050.00015.02
7.4.320.0030.00316.62
7.4.300.0030.00316.51
7.4.290.0030.00316.45
7.4.280.0030.00316.63
7.4.270.0040.00416.59
7.4.260.0030.00716.43
7.4.250.0050.00216.55
7.4.240.0040.00416.55
7.4.230.0000.00816.52
7.4.220.0110.01416.64
7.4.210.0060.00916.62
7.4.200.0050.00216.41
7.4.190.0070.00016.61
7.4.160.0100.01016.69
7.4.150.0100.00717.40
7.4.140.0100.00817.86
7.4.130.0090.01116.45
7.4.120.0130.00416.47
7.4.110.0100.00716.29
7.4.100.0000.01716.61
7.4.90.0150.00416.41
7.4.80.0080.01319.39
7.4.70.0080.00816.63
7.4.60.0090.00616.57
7.4.50.0000.00716.32
7.4.40.0070.01022.77
7.4.30.0070.01016.28
7.4.00.0030.01214.79
7.3.330.0000.00513.19
7.3.320.0050.00013.36
7.3.310.0000.00716.27
7.3.300.0000.00716.31
7.3.290.0120.00616.39
7.3.280.0090.01016.35
7.3.270.0030.01417.40
7.3.260.0080.01216.35
7.3.250.0110.00616.42
7.3.240.0130.01016.36
7.3.230.0150.00616.39
7.3.210.0140.00316.32
7.3.200.0120.01119.39
7.3.190.0170.00716.54
7.3.180.0080.00816.59
7.3.170.0150.00416.32
7.3.160.0090.00616.43
7.3.120.0160.00015.01
7.3.10.0100.00816.38
7.3.00.0090.00916.65
7.2.330.0040.01316.70
7.2.320.0110.01116.40
7.2.310.0120.00616.73
7.2.300.0070.01016.71
7.2.290.0120.00616.49
7.2.130.0130.00716.56
7.2.120.0050.01116.53
7.2.110.0110.00916.59
7.2.100.0140.00516.54
7.2.90.0110.01216.83
7.2.80.0170.00616.87
7.2.70.0060.01016.71
7.2.60.0050.01016.78
7.2.50.0050.00916.74
7.2.40.0060.00516.86
7.2.30.0100.00716.69
7.2.20.0060.01016.89
7.2.10.0080.01016.54
7.2.00.0090.00817.66
7.1.250.0140.00315.45
7.1.100.0070.00418.27
7.1.70.0070.00317.12
7.1.60.0100.01319.82
7.1.50.0030.01016.63
7.1.00.0070.07322.45
7.0.200.0030.00616.75
7.0.140.0070.07022.00
7.0.60.0170.07719.86
7.0.50.0070.05017.88
7.0.40.0100.07320.09
7.0.30.0270.08020.06
7.0.20.0270.04720.26
7.0.10.0030.04320.29
7.0.00.0100.04020.03
5.6.280.0030.07320.83
5.6.210.0100.03320.54
5.6.200.0130.04718.29
5.6.190.0070.06720.57
5.6.180.0400.04320.41
5.6.170.0330.04320.71
5.6.160.0070.06320.71
5.6.150.0000.05718.27
5.6.140.0130.06318.20
5.6.130.0200.06318.28
5.6.120.0070.08321.13
5.6.110.0070.09021.02
5.6.100.0100.03720.98
5.6.90.0100.08021.00
5.6.80.0170.07320.52
5.5.350.0330.04320.45
5.5.340.0070.04717.95
5.5.330.0000.04320.19
5.5.320.0200.04020.24
5.5.310.0330.06720.30
5.5.300.0200.05318.04
5.5.290.0000.09017.94
5.5.280.0130.07020.77
5.5.270.0170.03720.77
5.5.260.0200.06020.68
5.5.250.0100.03720.58
5.5.240.0070.07020.38
5.4.450.0500.05319.44
5.4.440.0330.05019.70
5.4.430.0070.06319.60
5.4.420.0270.05019.57
5.4.410.0170.06319.45
5.4.400.0870.05719.02
5.4.390.0730.06319.28
5.4.380.0770.05318.79
5.4.370.0030.04318.75
5.4.360.0070.04018.73
5.4.350.0080.03312.02
5.4.340.0080.04712.02
5.4.320.0060.04012.51
5.4.310.0060.04412.51
5.4.300.0050.03912.51
5.4.290.0070.04612.50
5.4.280.0070.03312.40
5.4.270.0100.03412.37
5.4.260.0060.04012.37
5.4.250.0060.04312.36
5.4.240.0100.04512.37
5.4.230.0090.03912.36
5.4.220.0050.03612.36
5.4.210.0070.03412.36
5.4.200.0060.03712.36
5.4.190.0070.03412.36
5.4.180.0030.04412.35
5.4.170.0040.03712.37
5.4.160.0050.04212.36
5.4.150.0070.03712.36
5.4.140.0070.03512.04
5.4.130.0070.03412.04
5.4.120.0050.03711.99
5.4.110.0060.03511.99
5.4.100.0100.03111.99
5.4.90.0050.03911.98
5.4.80.0040.03811.98
5.4.70.0060.03611.98
5.4.60.0070.03311.98
5.4.50.0100.03511.98
5.4.40.0040.03711.96
5.4.30.0050.03611.96
5.4.20.0080.03311.96
5.4.10.0050.03411.96
5.4.00.0060.03511.45
5.3.290.0090.04012.80
5.3.280.0030.04012.71
5.3.270.0100.04012.72
5.3.260.0050.04412.71
5.3.250.0040.03812.72
5.3.240.0100.04412.72
5.3.230.0060.03712.71
5.3.220.0050.03712.68
5.3.210.0060.03812.68
5.3.200.0030.03912.68
5.3.190.0110.04012.68
5.3.180.0080.03712.67
5.3.170.0060.03612.67
5.3.160.0060.03712.68
5.3.150.0050.03912.67
5.3.140.0050.04212.66
5.3.130.0050.04012.66
5.3.120.0040.04012.66
5.3.110.0030.04112.66
5.3.100.0070.04112.12
5.3.90.0020.03912.08
5.3.80.0040.03712.07
5.3.70.0060.03512.07
5.3.60.0040.03712.07
5.3.50.0070.03712.00
5.3.40.0040.03712.00
5.3.30.0130.03311.96
5.3.20.0030.03711.73
5.3.10.0050.03711.70
5.3.00.0050.03611.69
5.2.170.0030.0319.18
5.2.160.0040.0349.18
5.2.150.0050.0359.18
5.2.140.0060.0359.18
5.2.130.0050.0299.14
5.2.120.0040.0289.14
5.2.110.0090.0289.14
5.2.100.0050.0279.14
5.2.90.0010.0329.14
5.2.80.0040.0309.14
5.2.70.0040.0319.14
5.2.60.0030.0319.09
5.2.50.0060.0349.06
5.2.40.0030.0309.03
5.2.30.0020.0339.01
5.2.20.0060.0279.01
5.2.10.0040.0288.92
5.2.00.0080.0318.77
5.1.60.0050.0248.05
5.1.50.0040.0268.05
5.1.40.0060.0238.03
5.1.30.0050.0258.39
5.1.20.0060.0258.41
5.1.10.0040.0278.13
5.1.00.0070.0258.13
5.0.50.0030.0226.61
5.0.40.0050.0196.46
5.0.30.0030.0336.29
5.0.20.0070.0226.25
5.0.10.0040.0276.22
5.0.00.0040.0356.21
4.4.90.0010.0174.78
4.4.80.0040.0154.76
4.4.70.0050.0154.75
4.4.60.0030.0194.75
4.4.50.0030.0194.77
4.4.40.0030.0254.71
4.4.30.0030.0164.76
4.4.20.0040.0174.85
4.4.10.0040.0164.85
4.4.00.0040.0254.76
4.3.110.0020.0164.67
4.3.100.0030.0154.66
4.3.90.0020.0154.64
4.3.80.0010.0274.58
4.3.70.0030.0154.63
4.3.60.0040.0134.63
4.3.50.0030.0154.63
4.3.40.0030.0244.54
4.3.30.0020.0163.29
4.3.20.0020.0163.26
4.3.10.0010.0173.23
4.3.00.0100.0237.15

preferences:
37.27 ms | 400 KiB | 5 Q