3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { private $att = 0; public function __construct(){} public function do() { $this->att = 42; $array = ['test1', 'test2', 'test3', 'test4']; array_walk($array, [$this, 'go']); } public function go($value, $key) { echo $value,'<br>'; echo $this->att,'<br>'; } }

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.0060.01318.43
8.3.50.0150.00522.05
8.3.40.0040.01118.38
8.3.30.0070.00718.92
8.3.20.0040.00420.34
8.3.10.0000.00723.54
8.3.00.0050.00317.55
8.2.180.0150.00318.29
8.2.170.0070.01422.96
8.2.160.0030.01020.35
8.2.150.0000.00824.18
8.2.140.0040.00424.66
8.2.130.0030.00526.16
8.2.120.0000.00821.04
8.2.110.0050.00322.26
8.2.100.0100.00320.38
8.2.90.0000.00718.90
8.2.80.0030.00617.97
8.2.70.0060.00317.50
8.2.60.0040.00417.88
8.2.50.0060.00318.07
8.2.40.0000.00918.22
8.2.30.0090.00018.23
8.2.20.0000.00717.44
8.2.10.0000.00717.90
8.2.00.0020.00517.44
8.1.280.0140.00325.92
8.1.270.0080.00023.83
8.1.260.0070.00026.35
8.1.250.0040.00428.09
8.1.240.0090.00022.20
8.1.230.0040.00718.97
8.1.220.0040.00417.74
8.1.210.0060.00318.77
8.1.200.0040.00417.10
8.1.190.0050.00317.10
8.1.180.0060.00318.10
8.1.170.0000.00818.59
8.1.160.0040.00421.98
8.1.150.0040.00418.87
8.1.140.0060.00317.43
8.1.130.0000.00817.77
8.1.120.0000.00717.34
8.1.110.0000.00717.32
8.1.100.0040.00417.34
8.1.90.0040.00417.36
8.1.80.0040.00417.40
8.1.70.0030.00317.30
8.1.60.0080.00017.51
8.1.50.0040.00417.48
8.1.40.0070.00017.42
8.1.30.0000.00817.41
8.1.20.0060.00317.56
8.1.10.0000.00817.47
8.1.00.0040.00417.18
8.0.300.0050.00318.77
8.0.290.0050.00216.63
8.0.280.0000.00718.32
8.0.270.0030.00317.13
8.0.260.0030.00317.01
8.0.250.0030.00316.79
8.0.240.0060.00316.75
8.0.230.0030.00316.79
8.0.220.0000.00716.76
8.0.210.0000.00816.79
8.0.200.0030.00316.80
8.0.190.0090.00316.63
8.0.180.0050.00216.69
8.0.170.0040.00416.71
8.0.160.0070.00016.76
8.0.150.0030.00316.64
8.0.140.0070.00016.82
8.0.130.0030.00313.24
8.0.120.0000.00816.65
8.0.110.0030.00516.72
8.0.100.0040.00416.80
8.0.90.0050.00216.75
8.0.80.0100.01016.76
8.0.70.0000.00716.69
8.0.60.0000.00716.71
8.0.50.0040.00416.64
8.0.30.0110.00916.80
8.0.20.0070.01217.40
8.0.10.0050.00316.66
8.0.00.0070.01016.61
7.4.330.0000.00515.00
7.4.320.0000.00716.29
7.4.300.0000.00616.49
7.4.290.0000.00716.25
7.4.280.0000.00716.46
7.4.270.0030.00316.32
7.4.260.0000.00716.46
7.4.250.0000.00716.32
7.4.240.0000.00716.41
7.4.230.0000.00716.46
7.4.220.0180.00016.59
7.4.210.0080.00616.40
7.4.200.0030.00316.46
7.4.160.0090.00616.33
7.4.150.0160.00417.40
7.4.140.0140.00417.86
7.4.130.0140.00516.28
7.4.120.0050.01316.30
7.4.110.0130.00316.27
7.4.100.0120.00616.44
7.4.90.0060.01016.24
7.4.80.0140.00319.39
7.4.70.0030.01516.23
7.4.60.0150.00716.36
7.4.50.0040.00416.39
7.4.40.0060.01016.20
7.4.30.0060.00916.45
7.4.00.0030.00914.63
7.3.330.0000.00513.18
7.3.320.0000.00613.11
7.3.310.0000.00716.16
7.3.300.0070.00016.19
7.3.290.0070.00716.19
7.3.280.0120.00516.12
7.3.270.0090.00917.40
7.3.260.0110.01116.36
7.3.250.0130.00716.26
7.3.240.0080.01216.34
7.3.230.0080.00816.41
7.3.210.0160.00616.35
7.3.200.0130.00319.39
7.3.190.0150.00316.35
7.3.180.0110.00516.23
7.3.170.0070.01016.45
7.3.160.0120.00416.26
7.3.120.0030.01314.63
7.3.10.0030.00615.86
7.3.00.0000.01215.91
7.2.330.0140.00316.45
7.2.320.0170.00016.23
7.2.310.0130.01016.57
7.2.300.0100.00616.46
7.2.290.0110.00516.53
7.2.130.0040.00716.36
7.2.120.0040.00816.29
7.2.110.0130.00716.18
7.2.100.0030.00616.19
7.2.90.0080.00816.54
7.2.80.0060.01216.46
7.2.70.0190.00716.50
7.2.60.0090.00716.61
7.2.50.0120.00916.33
7.2.40.0130.00716.52
7.2.30.0060.00816.06
7.2.20.0130.00316.18
7.2.10.0080.00815.92
7.2.00.0050.01017.79
7.1.250.0030.00615.27
7.1.200.0090.00315.66
7.1.100.0160.00417.84
7.1.70.0040.00417.12
7.1.60.0100.01619.70
7.1.50.0100.00716.76
7.1.00.0000.07722.57
7.0.200.0030.00516.52
7.0.140.0030.07722.12
7.0.60.0130.06019.97
7.0.50.0070.04017.91
7.0.40.0200.05320.09
7.0.30.0430.04320.19
7.0.20.0230.08320.23
7.0.10.0100.04320.19
7.0.00.0100.08020.30
5.6.280.0000.07721.12
5.6.210.0100.06720.75
5.6.200.0100.07318.24
5.6.190.0070.09020.39
5.6.180.0230.04320.50
5.6.170.0270.05020.51
5.6.160.0070.04720.57
5.6.150.0100.07718.12
5.6.140.0170.07318.11
5.6.130.0100.06718.12
5.6.120.0130.07720.99
5.6.110.0070.05321.01
5.6.100.0170.07321.04
5.6.90.0070.08721.13
5.6.80.0100.08020.42
5.6.70.4270.03320.35
5.5.350.0100.07720.43
5.5.340.0000.05318.05
5.5.330.0100.03720.47
5.5.320.0370.05020.27
5.5.310.0300.04720.26
5.5.300.0070.07017.98
5.5.290.0100.03317.95
5.5.280.0000.06320.88
5.5.270.0100.03720.96
5.5.260.0030.04720.84
5.5.250.0070.03720.55
5.5.240.0200.08020.26
5.4.450.0570.05719.34
5.4.440.0700.05719.63
5.4.430.0130.05719.45
5.4.420.0070.05719.32
5.4.410.0100.06318.90
5.4.400.0130.05018.84
5.4.390.0200.04318.81
5.4.380.0100.05318.81
5.4.370.0230.04318.77
5.4.360.0230.04318.74
5.4.350.0070.03812.04
5.4.340.0070.03512.03
5.4.320.0070.03512.52
5.4.310.0070.03612.51
5.4.300.0060.03512.51
5.4.290.0050.03912.51
5.4.280.0080.03312.41
5.4.270.0080.03812.41
5.4.260.0040.03912.41
5.4.250.0040.04012.41
5.4.240.0090.03712.41
5.4.230.0100.03312.40
5.4.220.0060.03512.40
5.4.210.0050.03612.40
5.4.200.0080.03512.40
5.4.190.0050.03612.39
5.4.180.0060.03512.40
5.4.170.0050.03612.41
5.4.160.0060.03512.40
5.4.150.0070.03412.39
5.4.140.0090.03612.09
5.4.130.0040.04112.07
5.4.120.0050.03512.03
5.4.110.0090.03212.03
5.4.100.0060.03412.03
5.4.90.0060.03612.03
5.4.80.0080.03512.03
5.4.70.0040.03712.03
5.4.60.0060.03412.02
5.4.50.0090.03112.03
5.4.40.0050.03512.02
5.4.30.0070.03412.01
5.4.20.0050.03612.01
5.4.10.0070.03512.01
5.4.00.0030.03911.51
5.3.290.0110.03812.80
5.3.280.0050.03812.71
5.3.270.0070.03712.72
5.3.260.0050.03912.71
5.3.250.0070.03612.72
5.3.240.0060.03712.72
5.3.230.0060.03712.71
5.3.220.0070.03612.68
5.3.210.0060.04012.68
5.3.200.0010.04412.68
5.3.190.0080.04012.68
5.3.180.0070.05012.67
5.3.170.0110.03212.67
5.3.160.0050.03712.68
5.3.150.0050.03712.68
5.3.140.0070.03512.66
5.3.130.0050.03912.66
5.3.120.0090.03512.66
5.3.110.0060.03812.66
5.3.100.0060.03712.13
5.3.90.0090.03312.10
5.3.80.0030.03912.09
5.3.70.0050.03712.09
5.3.60.0050.03812.08
5.3.50.0060.03512.03
5.3.40.0050.03712.02
5.3.30.0060.03411.98
5.3.20.0050.03511.76
5.3.10.0060.03411.73
5.3.00.0030.03911.71
5.2.170.0060.0299.22
5.2.160.0080.0269.21
5.2.150.0040.0319.22
5.2.140.0060.0299.22
5.2.130.0080.0379.18
5.2.120.0050.0319.18
5.2.110.0060.0299.19
5.2.100.0040.0409.18
5.2.90.0030.0319.18
5.2.80.0050.0309.17
5.2.70.0060.0419.18
5.2.60.0040.0339.13
5.2.50.0090.0279.10
5.2.40.0070.0289.07
5.2.30.0100.0249.04
5.2.20.0040.0299.04
5.2.10.0090.0238.94
5.2.00.0050.0288.81
5.1.60.0050.0288.09
5.1.50.0040.0278.09
5.1.40.0030.0288.07
5.1.30.0080.0248.42
5.1.20.0020.0318.44
5.1.10.0050.0288.16
5.1.00.0040.0278.16
5.0.50.0060.0226.64
5.0.40.0050.0206.50
5.0.30.0030.0336.31
5.0.20.0050.0236.28
5.0.10.0020.0216.26
5.0.00.0020.0326.25
4.4.90.0030.0154.78
4.4.80.0020.0164.75
4.4.70.0050.0144.75
4.4.60.0020.0174.76
4.4.50.0030.0174.77
4.4.40.0040.0244.71
4.4.30.0030.0164.76
4.4.20.0030.0154.85
4.4.10.0020.0204.85
4.4.00.0030.0264.76
4.3.110.0030.0154.67
4.3.100.0040.0144.66
4.3.90.0030.0214.64
4.3.80.0020.0264.59
4.3.70.0020.0154.63
4.3.60.0030.0144.63
4.3.50.0030.0154.62
4.3.40.0050.0214.54
4.3.30.0020.0163.30
4.3.20.0010.0173.28
4.3.10.0030.0193.24
4.3.00.0130.0207.15

preferences:
39.44 ms | 401 KiB | 5 Q