3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test2 { public function getSomething() { return "something"; } } class Test1 { private $test2; public function __construct($test2) { $this->test2=$test2; } public function getTest2() { return $this->_test2; } } $test1=new Test1(new Test2()); echo $test1->getTest2()->getSomething();

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.0140.00016.75
8.3.50.0190.00421.94
8.3.40.0220.00018.96
8.3.30.0100.00319.27
8.3.20.0040.00420.30
8.3.10.0050.00321.90
8.3.00.0080.00017.93
8.2.180.0050.01416.75
8.2.170.0060.01522.96
8.2.160.0100.00320.35
8.2.150.0080.00024.18
8.2.140.0000.00824.66
8.2.130.0000.00826.16
8.2.120.0030.00520.95
8.2.110.0100.00022.14
8.2.100.0040.00719.51
8.2.90.0040.00419.23
8.2.80.0000.00817.97
8.2.70.0000.00917.63
8.2.60.0050.00317.93
8.2.50.0000.00818.07
8.2.40.0050.00218.09
8.2.30.0000.00818.20
8.2.20.0040.00417.57
8.2.10.0080.00017.99
8.2.00.0050.00317.69
8.1.280.0160.00025.92
8.1.270.0060.00323.84
8.1.260.0080.00026.35
8.1.250.0000.00828.09
8.1.240.0060.00323.98
8.1.230.0110.00019.10
8.1.220.0070.00017.74
8.1.210.0030.00518.77
8.1.200.0040.00417.35
8.1.190.0080.00017.23
8.1.180.0090.00018.10
8.1.170.0080.00018.46
8.1.160.0040.00422.00
8.1.150.0050.00218.83
8.1.140.0040.00417.36
8.1.130.0000.00717.83
8.1.120.0040.00417.40
8.1.110.0040.00417.41
8.1.100.0070.00017.39
8.1.90.0030.00317.33
8.1.80.0070.00017.31
8.1.70.0030.00317.36
8.1.60.0080.00017.57
8.1.50.0000.00817.54
8.1.40.0000.00817.43
8.1.30.0060.00317.55
8.1.20.0050.00317.64
8.1.10.0000.00717.51
8.1.00.0000.00817.51
8.0.300.0000.00818.77
8.0.290.0030.00616.63
8.0.280.0030.00318.32
8.0.270.0000.00717.21
8.0.260.0030.00317.11
8.0.250.0030.00316.98
8.0.240.0030.00316.83
8.0.230.0000.00817.00
8.0.220.0030.00316.78
8.0.210.0060.00016.86
8.0.200.0070.00016.85
8.0.190.0000.00716.96
8.0.180.0040.00416.89
8.0.170.0000.00716.83
8.0.160.0000.00816.86
8.0.150.0040.00416.73
8.0.140.0000.00816.81
8.0.130.0060.00013.27
8.0.120.0000.00816.96
8.0.110.0030.00516.90
8.0.100.0040.00416.80
8.0.90.0000.00716.73
8.0.80.0060.00916.89
8.0.70.0040.00416.90
8.0.60.0000.00716.86
8.0.50.0000.00716.96
8.0.30.0120.00917.19
8.0.20.0140.01317.40
8.0.10.0050.00217.05
8.0.00.0130.01016.74
7.4.330.0000.00615.08
7.4.320.0000.00616.34
7.4.300.0000.00616.52
7.4.290.0030.00316.66
7.4.280.0030.00616.64
7.4.270.0030.00316.63
7.4.260.0000.00716.50
7.4.250.0040.00416.50
7.4.240.0040.00416.59
7.4.230.0000.00716.35
7.4.220.0080.01116.62
7.4.210.0030.01616.66
7.4.200.0030.00316.64
7.4.160.0120.00316.68
7.4.150.0090.00917.40
7.4.140.0100.01017.86
7.4.130.0100.00716.63
7.4.120.0100.00716.66
7.4.110.0060.01216.47
7.4.100.0070.01416.69
7.4.90.0030.01416.43
7.4.80.0090.01219.39
7.4.70.0060.01316.46
7.4.60.0120.00416.58
7.4.50.0040.00416.52
7.4.40.0140.00316.38
7.4.30.0100.00616.54
7.4.00.0030.01014.97
7.3.330.0030.00313.36
7.3.320.0000.00513.39
7.3.310.0030.00416.39
7.3.300.0070.00016.37
7.3.290.0100.00616.33
7.3.280.0090.00816.34
7.3.270.0140.00317.40
7.3.260.0080.01616.36
7.3.250.0150.00616.51
7.3.240.0070.01016.58
7.3.230.0060.01016.39
7.3.210.0120.00616.72
7.3.200.0100.01119.39
7.3.190.0160.00016.39
7.3.180.0120.00316.56
7.3.170.0090.00916.63
7.3.160.0110.00416.39
7.3.120.0050.00514.88
7.2.330.0070.01016.42
7.2.320.0090.00916.63
7.2.310.0100.00716.50
7.2.300.0070.01016.75
7.2.290.0060.01016.44
7.2.60.0070.01016.77
7.2.00.0230.00818.98
7.1.200.0060.00315.29
7.1.100.0070.00717.73
7.1.70.0000.00817.12
7.1.60.0100.01319.25
7.1.50.0070.01516.72
7.1.00.0030.07722.40
7.0.200.0000.00916.78
7.0.140.0000.07721.97
7.0.60.0200.07019.86
7.0.50.0070.05317.98
7.0.40.0100.05020.24
7.0.30.0270.07720.24
7.0.20.0400.07320.25
7.0.10.0100.05020.14
7.0.00.0030.04320.23
5.6.280.0030.07320.79
5.6.210.0130.08020.57
5.6.200.0070.07718.16
5.6.190.0070.04020.34
5.6.180.0270.08020.56
5.6.170.0230.06320.55
5.6.160.0000.09320.58
5.6.150.0030.06318.18
5.6.140.0070.07318.29
5.6.130.0100.08318.18
5.6.120.0030.09021.05
5.6.110.0100.07721.02
5.6.100.0270.06021.05
5.6.90.0200.06021.01
5.6.80.0130.07720.41
5.5.350.3700.03320.46
5.5.340.0100.06318.01
5.5.330.0070.07320.19
5.5.320.0270.08020.38
5.5.310.0400.07020.34
5.5.300.0000.04717.92
5.5.290.0030.04017.98
5.5.280.0000.04720.68
5.5.270.0070.06020.86
5.5.260.0100.08320.77
5.5.250.0170.07720.80
5.5.240.0070.07320.19
5.4.450.0800.03719.41
5.4.440.0230.05319.32
5.4.430.0400.04719.30
5.4.420.0370.03319.42
5.4.410.0300.05019.42
5.4.400.0300.04318.98
5.4.390.0600.04319.21
5.4.380.0170.05018.51
5.4.370.0170.05718.72
5.4.360.0170.05018.63
5.4.350.0130.05718.59
5.4.340.0200.07018.68
5.4.320.0040.04112.50
5.4.310.0070.03912.50
5.4.300.0070.03812.51
5.4.290.0040.04012.50
5.4.280.0060.04512.40
5.4.270.0070.03612.40
5.4.260.0070.03712.40
5.4.250.0080.03712.40
5.4.240.0060.03612.40
5.4.230.0040.04112.39
5.4.220.0060.03612.39
5.4.210.0050.03612.39
5.4.200.0070.03712.39
5.4.190.0070.03612.38
5.4.180.0050.03712.39
5.4.170.0070.03612.39
5.4.160.0080.04712.40
5.4.150.0040.03912.39
5.4.140.0060.03812.07
5.4.130.0030.04012.07
5.4.120.0060.03512.02
5.4.110.0100.03712.02
5.4.100.0020.04012.02
5.4.90.0070.03612.02
5.4.80.0040.03912.02
5.4.70.0060.03512.02
5.4.60.0050.03912.02
5.4.50.0070.03612.01
5.4.40.0060.03512.00
5.4.30.0050.03812.00
5.4.20.0080.03312.00
5.4.10.0050.03512.00
5.4.00.0070.03811.49
5.3.290.0040.04312.80
5.3.280.0050.04012.71
5.3.270.0050.04012.73
5.3.260.0090.03712.72
5.3.250.0070.04112.71
5.3.240.0040.05112.72
5.3.230.0040.04312.71
5.3.220.0040.04012.68
5.3.210.0060.03912.68
5.3.200.0080.04212.68
5.3.190.0090.04512.67
5.3.180.0080.03412.67
5.3.170.0120.03312.67
5.3.160.0160.03212.67
5.3.150.0120.03112.67
5.3.140.0060.03912.66
5.3.130.0070.04012.66
5.3.120.0080.04612.66
5.3.110.0030.04312.66
5.3.100.0070.03712.13
5.3.90.0120.04112.11
5.3.80.0070.03812.10
5.3.70.0040.04012.10
5.3.60.0080.03512.08
5.3.50.0070.03612.04
5.3.40.0040.04012.03
5.3.30.0050.03711.98
5.3.20.0080.04611.77
5.3.10.0050.05011.74
5.3.00.0080.03611.73
5.2.170.0030.0339.23
5.2.160.0030.0329.23
5.2.150.0080.0289.23
5.2.140.0050.0309.23
5.2.130.0060.0319.18
5.2.120.0010.0389.18
5.2.110.0060.0349.20
5.2.100.0050.0389.18
5.2.90.0040.0379.18
5.2.80.0040.0359.18
5.2.70.0040.0359.18
5.2.60.0060.0319.14
5.2.50.0060.0299.10
5.2.40.0050.0299.08
5.2.30.0020.0349.05
5.2.20.0080.0279.04
5.2.10.0060.0288.95
5.2.00.0070.0278.81
5.1.60.0040.0248.10
5.1.50.0070.0228.09
5.1.40.0050.0298.07
5.1.30.0040.0288.42
5.1.20.0070.0378.45
5.1.10.0060.0358.18
5.1.00.0080.0318.18
5.0.50.0040.0276.65
5.0.40.0030.0286.50
5.0.30.0070.0356.32
5.0.20.0020.0236.28
5.0.10.0020.0226.26
5.0.00.0040.0326.26
4.4.90.0030.0224.78
4.4.80.0040.0204.75
4.4.70.0040.0194.75
4.4.60.0040.0204.75
4.4.50.0050.0194.77
4.4.40.0050.0314.70
4.4.30.0030.0194.76
4.4.20.0010.0194.85
4.4.10.0020.0194.85
4.4.00.0030.0254.76
4.3.110.0040.0164.67
4.3.100.0020.0174.66
4.3.90.0040.0154.63
4.3.80.0030.0274.58
4.3.70.0020.0184.63
4.3.60.0020.0194.63
4.3.50.0030.0194.63
4.3.40.0040.0274.54
4.3.30.0020.0193.30
4.3.20.0040.0183.28
4.3.10.0020.0203.24
4.3.00.0170.01315.26

preferences:
44.94 ms | 401 KiB | 5 Q