3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Add { public $left; public $right; public function construct($left = 0, $right = 0) { $this->left = $left; $this->right = $right; } public function doMath() { return $this->left + $this->right; } } $adder = new Add; $adder->left = 1; $adder->right = 2; echo $adder->doMath(); // 3 $adder->left = 3; echo $adder->doMath(); // 5

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.01118.42
8.3.50.0090.00621.14
8.3.40.0090.00618.66
8.3.30.0100.00719.27
8.3.20.0000.00820.21
8.3.10.0080.00022.09
8.3.00.0000.00822.34
8.2.180.0000.01516.48
8.2.170.0110.00722.96
8.2.160.0070.00719.06
8.2.150.0080.00024.18
8.2.140.0090.00924.66
8.2.130.0050.00326.16
8.2.120.0040.00819.54
8.2.110.0040.00422.13
8.2.100.0080.00419.35
8.2.90.0050.00319.13
8.2.80.0000.00718.05
8.2.70.0040.01217.11
8.2.60.0000.00817.92
8.2.50.0060.00318.07
8.2.40.0000.01018.03
8.2.30.0040.00418.06
8.2.20.0040.00417.54
8.2.10.0040.00417.54
8.2.00.0080.00017.50
8.1.280.0100.00725.92
8.1.270.0080.00818.64
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0100.00023.84
8.1.230.0080.00319.09
8.1.220.0050.00317.77
8.1.210.0030.00618.77
8.1.200.0030.00617.38
8.1.190.0040.00417.54
8.1.180.0050.00318.66
8.1.170.0090.00018.39
8.1.160.0000.00722.02
8.1.150.0050.00318.58
8.1.140.0000.00717.35
8.1.130.0030.00317.88
8.1.120.0040.00417.34
8.1.110.0000.00717.30
8.1.100.0030.00517.24
8.1.90.0000.00717.39
8.1.80.0040.00417.36
8.1.70.0030.00317.40
8.1.60.0000.00817.50
8.1.50.0030.00517.55
8.1.40.0040.00417.54
8.1.30.0020.00517.63
8.1.20.0030.00617.55
8.1.10.0040.00417.57
8.1.00.0040.00417.52
8.0.300.0070.00018.77
8.0.290.0000.00717.29
8.0.280.0030.00318.45
8.0.270.0040.00417.27
8.0.260.0000.00616.73
8.0.250.0000.00716.88
8.0.240.0060.00317.01
8.0.230.0000.00716.77
8.0.220.0030.00316.71
8.0.210.0050.00216.70
8.0.200.0050.00316.82
8.0.190.0030.00616.80
8.0.180.0000.00716.77
8.0.170.0070.00016.73
8.0.160.0050.00216.89
8.0.150.0030.00516.82
8.0.140.0000.00716.75
8.0.130.0000.00613.27
8.0.120.0040.00416.81
8.0.110.0040.00416.67
8.0.100.0070.00016.71
8.0.90.0040.00416.73
8.0.80.0110.00816.72
8.0.70.0040.00416.91
8.0.60.0020.00516.63
8.0.50.0000.00716.86
8.0.30.0150.00316.99
8.0.20.0080.01117.40
8.0.10.0000.00716.85
8.0.00.0130.00616.62
7.4.330.0020.00215.00
7.4.320.0000.00716.37
7.4.300.0060.00016.66
7.4.290.0000.00716.55
7.4.280.0030.00316.62
7.4.270.0030.00316.66
7.4.260.0070.00016.42
7.4.250.0070.00016.50
7.4.240.0020.00516.48
7.4.230.0040.00416.59
7.4.220.0110.00816.60
7.4.210.0070.00716.56
7.4.200.0050.00316.69
7.4.190.0040.00416.49
7.4.160.0040.01216.49
7.4.150.0120.00617.40
7.4.140.0120.01217.86
7.4.130.0140.00716.39
7.4.120.0110.00616.43
7.4.110.0150.00716.48
7.4.100.0130.01016.52
7.4.90.0100.00716.37
7.4.80.0140.00319.39
7.4.70.0090.00916.32
7.4.60.0090.00916.56
7.4.50.0000.00516.48
7.4.40.0090.00322.77
7.4.30.0070.00916.57
7.4.00.0030.01414.89
7.3.330.0000.00513.32
7.3.320.0030.00313.29
7.3.310.0060.00016.20
7.3.300.0040.00416.32
7.3.290.0040.01316.36
7.3.280.0020.01216.26
7.3.270.0120.00917.40
7.3.260.0030.01316.32
7.3.250.0110.00516.48
7.3.240.0060.01116.61
7.3.230.0110.00616.39
7.3.210.0040.01716.48
7.3.200.0110.00619.39
7.3.190.0130.00716.25
7.3.180.0130.00716.41
7.3.170.0060.00916.37
7.3.160.0080.00816.50
7.3.120.0030.01214.83
7.3.110.0110.00714.88
7.3.100.0110.00414.37
7.3.90.0100.00314.69
7.3.80.0000.01414.63
7.3.70.0040.01114.88
7.3.60.0100.00714.62
7.3.50.0000.01414.90
7.3.40.0030.01314.79
7.3.30.0040.00814.64
7.3.20.0070.00716.63
7.3.10.0030.01016.70
7.3.00.0060.00616.71
7.2.330.0150.00316.56
7.2.320.0180.00516.66
7.2.310.0100.00716.43
7.2.300.0040.01216.64
7.2.290.0120.00316.63
7.2.250.0070.01115.16
7.2.240.0060.01315.23
7.2.230.0040.00815.07
7.2.220.0030.00914.97
7.2.210.0030.01615.25
7.2.200.0040.01115.20
7.2.190.0030.01214.88
7.2.180.0090.00015.27
7.2.170.0060.01215.13
7.2.60.0030.00816.69
7.2.50.0070.01016.69
7.2.00.0040.01119.27
7.1.330.0060.00915.54
7.1.320.0060.01015.92
7.1.310.0030.00615.69
7.1.300.0100.00315.70
7.1.290.0040.01415.87
7.1.280.0040.00415.86
7.1.270.0110.00415.84
7.1.260.0030.01015.55
7.1.200.0070.00615.67
7.1.100.0000.01217.91
7.1.70.0050.00317.20
7.1.60.0040.01119.82
7.1.50.0130.00616.98
7.1.00.0030.03322.47
7.0.200.0000.00816.68
7.0.140.0070.07021.95
7.0.70.4930.04719.86
7.0.60.0030.04319.78
7.0.50.0000.04317.87
7.0.40.0070.05320.26
7.0.30.0030.08320.07
7.0.20.0270.06720.16
7.0.10.0230.06320.12
7.0.00.0030.04720.24
5.6.280.0030.07321.05
5.6.210.0000.04320.72
5.6.200.0070.07718.14
5.6.190.0070.09020.63
5.6.180.0230.03720.36
5.6.170.0470.07720.57
5.6.160.0130.07720.55
5.6.150.0100.06318.29
5.6.140.0130.06318.18
5.6.130.0000.05318.16
5.6.120.0130.07021.02
5.6.110.0130.03320.96
5.6.100.0100.08321.12
5.6.90.0030.08720.97
5.6.80.0070.06020.43
5.6.70.0200.07020.38
5.5.350.0130.07720.44
5.5.340.0130.07717.93
5.5.330.0100.06720.48
5.5.320.0030.04020.36
5.5.310.0300.07320.26
5.5.300.0000.07718.07
5.5.290.0070.08018.07
5.5.280.0100.08020.74
5.5.270.0070.08020.95
5.5.260.0100.06720.76
5.5.250.0130.07720.59
5.5.240.0070.03720.23
5.4.450.0670.06019.19
5.4.440.1000.05019.54
5.4.430.0670.06719.16
5.4.420.1230.05019.33
5.4.410.0330.05719.32
5.4.400.0970.06019.15
5.4.390.0830.06019.01
5.4.380.0330.05018.75
5.4.370.0270.05718.77
5.4.360.0570.05018.55
5.4.350.0070.04612.03
5.4.340.0110.04512.02
5.4.320.0060.03612.51
5.4.310.0060.03812.50
5.4.300.0040.03812.50
5.4.290.0110.04912.50
5.4.280.0040.04212.37
5.4.270.0080.04112.37
5.4.260.0060.03912.37
5.4.250.0090.03712.37
5.4.240.0090.03312.37
5.4.230.0070.03612.36
5.4.220.0060.04012.37
5.4.210.0120.04812.36
5.4.200.0060.07712.36
5.4.190.0150.05312.36
5.4.180.0110.04312.36
5.4.170.0150.04412.37
5.4.160.0070.05312.37
5.4.150.0080.05412.36
5.4.140.0110.04612.04
5.4.130.0110.04212.04
5.4.120.0080.04611.99
5.4.110.0090.04911.99
5.4.100.0090.03611.99
5.4.90.0090.04011.99
5.4.80.0050.04511.99
5.4.70.0120.05311.99
5.4.60.0050.05311.98
5.4.50.0030.05611.98
5.4.40.0040.05511.97
5.4.30.0120.05211.97
5.4.20.0140.05311.97
5.4.10.0110.04911.97
5.4.00.0100.06011.46
5.3.290.0070.03912.80
5.3.280.0050.05812.70
5.3.270.0150.06112.73
5.3.260.0130.06612.72
5.3.250.0110.05112.72
5.3.240.0080.05812.72
5.3.230.0130.05412.71
5.3.220.0130.05412.68
5.3.210.0070.06012.68
5.3.200.0080.05012.68
5.3.190.0100.04312.67
5.3.180.0060.04012.67
5.3.170.0090.04112.67
5.3.160.0080.03912.67
5.3.150.0120.03612.67
5.3.140.0100.05212.66
5.3.130.0080.04212.66
5.3.120.0030.04212.66
5.3.110.0050.04012.66
5.3.100.0120.03012.12
5.3.90.0090.04112.08
5.3.80.0060.03612.07
5.3.70.0040.03912.07
5.3.60.0060.03712.06
5.3.50.0090.04112.00
5.3.40.0050.03812.00
5.3.30.0040.03911.96
5.3.20.0050.03711.74
5.3.10.0150.05411.70
5.3.00.0060.04811.69
5.2.170.0090.0379.19
5.2.160.0060.0309.20
5.2.150.0060.0399.19
5.2.140.0080.0419.19
5.2.130.0090.0399.15
5.2.120.0070.0389.15
5.2.110.0050.0429.16
5.2.100.0090.0379.16
5.2.90.0050.0419.15
5.2.80.0030.0399.15
5.2.70.0070.0299.15
5.2.60.0060.0309.09
5.2.50.0030.0319.07
5.2.40.0010.0329.04
5.2.30.0040.0319.03
5.2.20.0060.0409.01
5.2.10.0050.0308.92
5.2.00.0070.0318.80
5.1.60.0030.0278.07
5.1.50.0020.0318.07
5.1.40.0040.0268.06
5.1.30.0070.0278.40
5.1.20.0030.0288.43
5.1.10.0010.0338.14
5.1.00.0050.0258.14
5.0.50.0040.0216.63
5.0.40.0050.0186.48
5.0.30.0020.0336.30
5.0.20.0040.0186.27
5.0.10.0030.0206.24
5.0.00.0040.0306.23
4.4.90.0030.0154.78
4.4.80.0030.0164.76
4.4.70.0040.0154.75
4.4.60.0030.0164.76
4.4.50.0020.0174.77
4.4.40.0030.0254.71
4.4.30.0030.0164.76
4.4.20.0030.0164.84
4.4.10.0090.0134.85
4.4.00.0040.0284.76
4.3.110.0040.0234.67
4.3.100.0060.0244.67
4.3.90.0040.0164.63
4.3.80.0050.0304.59
4.3.70.0020.0204.63
4.3.60.0080.0244.63
4.3.50.0040.0224.62
4.3.40.0040.0374.54
4.3.30.0050.0223.29
4.3.20.0000.0253.27
4.3.10.0010.0233.23
4.3.00.0100.0207.54

preferences:
40.01 ms | 401 KiB | 5 Q