3v4l.org

run code in 300+ PHP versions simultaneously
<?php class InCommon { private $baz = 'foo'; public function out(){ echo "BAZ: ".$this->baz; } } class Foo extends InCommon { private $baz = 'foo'; } class Bar extends InCommon { private $baz = 'bar'; public function mess($target){ $target->baz = 'cats'; } } $foo = new Foo(); $bar = new Bar(); $bar->mess($foo); $foo->out();

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.0130.01018.43
8.3.50.0120.00921.98
8.3.40.0060.00918.91
8.3.30.0140.00319.04
8.3.20.0040.00420.21
8.3.10.0040.00420.60
8.3.00.0110.00619.47
8.2.180.0180.00018.33
8.2.170.0070.01122.96
8.2.160.0110.00720.27
8.2.150.0060.00324.18
8.2.140.0040.00424.66
8.2.130.0080.00026.16
8.2.120.0080.00022.29
8.2.110.0030.00621.02
8.2.100.0070.00317.84
8.2.90.0040.00417.82
8.2.80.0040.00417.97
8.2.70.0080.00017.63
8.2.60.0040.00417.91
8.2.50.0000.00818.07
8.2.40.0040.00418.09
8.2.30.0040.00419.19
8.2.20.0040.00417.57
8.2.10.0050.00318.06
8.2.00.0030.00517.69
8.1.280.0110.00425.92
8.1.270.0050.00323.91
8.1.260.0050.00326.35
8.1.250.0070.00028.09
8.1.240.0040.00422.70
8.1.230.0080.00421.03
8.1.220.0000.00817.74
8.1.210.0060.00318.77
8.1.200.0060.00617.23
8.1.190.0000.00817.23
8.1.180.0030.00518.10
8.1.170.0080.00418.59
8.1.160.0000.00721.81
8.1.150.0030.00518.83
8.1.140.0000.00717.39
8.1.130.0040.00417.71
8.1.120.0040.00417.43
8.1.110.0030.00317.38
8.1.100.0000.00717.43
8.1.90.0040.00417.47
8.1.80.0080.00017.43
8.1.70.0050.00217.26
8.1.60.0000.00817.50
8.1.50.0060.00317.43
8.1.40.0040.00417.56
8.1.30.0050.00317.64
8.1.20.0030.00617.64
8.1.10.0050.00317.51
8.1.00.0060.00617.56
8.0.300.0040.00419.94
8.0.290.0050.00316.63
8.0.280.0070.00018.32
8.0.270.0030.00317.20
8.0.260.0030.00317.16
8.0.250.0070.00016.82
8.0.240.0000.00716.91
8.0.230.0030.00317.02
8.0.220.0080.00016.95
8.0.210.0000.00716.81
8.0.200.0030.00316.95
8.0.190.0070.00016.81
8.0.180.0050.00216.94
8.0.170.0040.00416.83
8.0.160.0050.00316.75
8.0.150.0080.00016.92
8.0.140.0040.00416.76
8.0.130.0030.00313.37
8.0.120.0060.00316.90
8.0.110.0040.00416.86
8.0.100.0000.00716.76
8.0.90.0050.00216.92
8.0.80.0100.01016.86
8.0.70.0040.00416.77
8.0.60.0000.00816.84
8.0.50.0050.00216.95
8.0.30.0130.00717.07
8.0.20.0120.00717.40
8.0.10.0040.00416.84
8.0.00.0100.01016.82
7.4.330.0050.00015.07
7.4.320.0000.00616.46
7.4.300.0040.00416.41
7.4.290.0000.00716.48
7.4.280.0070.00016.56
7.4.270.0040.00416.46
7.4.260.0040.00416.48
7.4.250.0000.00816.36
7.4.240.0070.00016.57
7.4.230.0000.00816.71
7.4.220.0090.01516.68
7.4.210.0070.00716.60
7.4.200.0030.00316.34
7.4.160.0090.00616.63
7.4.150.0060.01217.40
7.4.140.0100.00717.86
7.4.130.0090.00816.63
7.4.120.0110.00516.47
7.4.110.0070.01116.56
7.4.100.0030.01316.46
7.4.90.0070.01016.45
7.4.80.0170.00319.37
7.4.70.0120.00616.38
7.4.60.0070.01016.64
7.4.50.0040.00016.44
7.4.40.0110.00916.34
7.4.30.0070.01616.34
7.4.00.0100.00614.60
7.3.330.0000.00513.29
7.3.320.0050.00013.14
7.3.310.0070.00016.40
7.3.300.0030.00316.41
7.3.290.0060.01016.33
7.3.280.0110.00516.36
7.3.270.0150.00317.40
7.3.260.0060.01216.59
7.3.250.0120.00616.40
7.3.240.0090.00616.32
7.3.230.0110.00616.39
7.3.210.0040.01216.31
7.3.200.0130.01019.39
7.3.190.0120.01016.62
7.3.180.0060.01116.43
7.3.170.0030.01416.27
7.3.160.0070.01016.57
7.3.10.0120.00416.54
7.3.00.0080.00416.29
7.2.330.0060.01216.66
7.2.320.0090.00916.41
7.2.310.0070.01016.55
7.2.300.0170.00016.34
7.2.290.0100.00616.70
7.2.130.0080.00416.63
7.2.120.0090.00916.50
7.2.110.0070.00716.67
7.2.100.0030.01316.67
7.2.90.0080.00616.73
7.2.80.0120.00516.82
7.2.70.0070.00816.63
7.2.60.0050.00816.71
7.2.50.0060.00616.68
7.2.40.0070.00916.70
7.2.30.0050.00916.89
7.2.20.0030.01016.73
7.2.10.0080.00816.86
7.2.00.0080.00417.57
7.1.250.0140.00315.54
7.1.200.0030.01015.92
7.1.100.0000.01118.06
7.1.70.0060.00317.15
7.1.60.0100.01319.32
7.1.50.0070.01517.02
7.1.00.0100.07022.31
7.0.200.0030.00716.41
7.0.140.0000.07721.95
7.0.60.0030.06719.91
7.0.50.0070.07717.87
7.0.40.0200.07720.30
7.0.30.0200.04020.25
7.0.20.0330.06720.14
7.0.10.0100.08720.05
7.0.00.0100.06720.12
5.6.280.0070.07020.91
5.6.210.0070.08020.48
5.6.200.0030.06318.16
5.6.190.0100.04720.60
5.6.180.0670.03320.46
5.6.170.0300.07320.54
5.6.160.0030.04320.57
5.6.150.0000.04318.15
5.6.140.0070.04018.18
5.6.130.0030.08018.14
5.6.120.0100.08320.92
5.6.110.0070.06021.09
5.6.100.0100.04721.12
5.6.90.0070.08320.99
5.6.80.0200.05320.41
5.5.350.0270.04720.46
5.5.340.0130.03017.98
5.5.330.0030.04320.37
5.5.320.0400.07020.30
5.5.310.0200.03320.41
5.5.300.0070.05718.01
5.5.290.0030.08317.97
5.5.280.0100.08020.85
5.5.270.0200.07720.96
5.5.260.0100.07720.89
5.5.250.0130.08320.55
5.5.240.1930.03320.28
5.4.450.0270.03319.49
5.4.440.0230.05719.38
5.4.430.0100.06719.69
5.4.420.0670.00019.45
5.4.410.0670.00019.44
5.4.400.0630.00019.22
5.4.390.0600.00019.05
5.4.380.0330.05318.60
5.4.370.0270.05718.89
5.4.360.0330.04718.63
5.4.350.0370.05318.84
5.4.340.0470.06318.70
5.4.320.0070.03512.51
5.4.310.0050.03912.51
5.4.300.0060.03612.50
5.4.290.0060.03912.50
5.4.280.0090.03212.39
5.4.270.0060.03712.39
5.4.260.0070.03712.40
5.4.250.0050.04112.40
5.4.240.0080.03412.40
5.4.230.0090.03412.39
5.4.220.0050.03712.39
5.4.210.0040.03812.39
5.4.200.0090.03612.39
5.4.190.0080.03512.39
5.4.180.0070.03512.39
5.4.170.0060.04012.40
5.4.160.0070.03512.39
5.4.150.0090.04012.39
5.4.140.0060.04112.08
5.4.130.0070.03412.07
5.4.120.0060.03512.02
5.4.110.0050.03712.01
5.4.100.0060.03812.02
5.4.90.0060.05112.02
5.4.80.0050.03812.02
5.4.70.0050.03612.01
5.4.60.0040.03712.01
5.4.50.0060.03512.02
5.4.40.0060.03612.00
5.4.30.0020.04912.00
5.4.20.0100.03512.00
5.4.10.0030.03812.00
5.4.00.0050.03911.49
5.3.290.0070.04612.80
5.3.280.0080.03612.71
5.3.270.0050.05212.72
5.3.260.0090.04212.71
5.3.250.0040.03812.72
5.3.240.0090.03512.72
5.3.230.0040.03812.71
5.3.220.0060.03612.68
5.3.210.0110.04012.68
5.3.200.0080.03312.68
5.3.190.0080.03812.68
5.3.180.0080.03512.67
5.3.170.0050.03712.67
5.3.160.0060.03712.68
5.3.150.0070.04712.68
5.3.140.0080.03712.66
5.3.130.0060.03912.66
5.3.120.0030.04112.66
5.3.110.0060.04412.65
5.3.100.0030.03912.12
5.3.90.0070.04012.12
5.3.80.0070.04012.10
5.3.70.0050.03612.10
5.3.60.0080.04212.08
5.3.50.0070.03912.04
5.3.40.0070.03512.03
5.3.30.0080.03311.98
5.3.20.0030.03711.78
5.3.10.0070.03311.73
5.3.00.0090.04311.72
5.2.170.0050.0299.23
5.2.160.0070.0269.23
5.2.150.0050.0299.23
5.2.140.0050.0369.22
5.2.130.0010.0329.18
5.2.120.0050.0439.18
5.2.110.0040.0309.20
5.2.100.0060.0349.19
5.2.90.0050.0289.19
5.2.80.0040.0309.18
5.2.70.0060.0359.18
5.2.60.0010.0339.13
5.2.50.0040.0319.11
5.2.40.0050.0289.07
5.2.30.0040.0319.06
5.2.20.0050.0299.04
5.2.10.0060.0268.95
5.2.00.0030.0318.82
5.1.60.0040.0248.10
5.1.50.0030.0308.09
5.1.40.0070.0218.07
5.1.30.0020.0298.42
5.1.20.0050.0258.45
5.1.10.0040.0328.17
5.1.00.0100.0298.17
5.0.50.0040.0206.65
5.0.40.0030.0196.51
5.0.30.0020.0346.32
5.0.20.0010.0216.29
5.0.10.0040.0216.26
5.0.00.0030.0316.26
4.4.90.0050.0134.78
4.4.80.0050.0284.75
4.4.70.0020.0324.75
4.4.60.0050.0214.75
4.4.50.0040.0204.77
4.4.40.0030.0354.70
4.4.30.0030.0144.76
4.4.20.0040.0144.84
4.4.10.0030.0154.85
4.4.00.0040.0384.75
4.3.110.0030.0154.67
4.3.100.0040.0134.67
4.3.90.0020.0154.63
4.3.80.0030.0234.59
4.3.70.0030.0144.63
4.3.60.0040.0144.63
4.3.50.0070.0144.63
4.3.40.0040.0244.54
4.3.30.0050.0143.30
4.3.20.0020.0163.28
4.3.10.0010.0163.24
4.3.00.0070.0137.84

preferences:
33.57 ms | 400 KiB | 5 Q