3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { protected $foo; public function getFoo() { return $this->foo; } } class Bar extends Foo { public function __construct($foo) { $this->foo = $foo; } } class FooBar { public $test = 'Hello World!'; } $test = new FooBar(); $foo = new Foo($test); $bar = new Bar($test); var_dump($foo); echo "---\n"; var_dump($foo);

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.0090.00618.20
8.3.50.0120.00822.17
8.3.40.0100.00718.84
8.3.30.0100.00719.09
8.3.20.0050.00320.34
8.3.10.0070.00022.08
8.3.00.0000.00822.42
8.2.180.0090.00916.63
8.2.170.0070.00722.96
8.2.160.0160.00020.95
8.2.150.0060.00324.18
8.2.140.0080.00024.66
8.2.130.0030.00526.16
8.2.120.0080.00019.48
8.2.110.0090.00022.23
8.2.100.0110.00017.84
8.2.90.0080.00417.47
8.2.80.0040.00417.97
8.2.70.0040.00417.93
8.2.60.0030.00617.93
8.2.50.0030.00618.10
8.2.40.0040.00420.45
8.2.30.0000.00717.95
8.2.20.0040.00417.70
8.2.10.0030.00617.69
8.2.00.0090.00317.56
8.1.280.0090.00625.92
8.1.270.0000.00822.11
8.1.260.0110.00426.35
8.1.250.0000.00828.09
8.1.240.0080.00022.19
8.1.230.0040.00719.01
8.1.220.0050.00317.74
8.1.210.0040.00418.77
8.1.200.0040.00417.36
8.1.190.0000.00817.23
8.1.180.0050.00318.10
8.1.170.0060.00318.57
8.1.160.0040.00421.96
8.1.150.0090.00018.51
8.1.140.0000.00717.40
8.1.130.0030.00317.80
8.1.120.0040.00417.40
8.1.110.0000.00917.41
8.1.100.0040.00417.41
8.1.90.0040.00417.42
8.1.80.0070.00017.30
8.1.70.0000.00717.35
8.1.60.0040.00817.58
8.1.50.0000.00817.52
8.1.40.0030.00617.55
8.1.30.0020.00517.65
8.1.20.0000.00817.56
8.1.10.0040.00417.57
8.1.00.0000.00717.51
8.0.300.0030.00519.98
8.0.290.0040.00416.75
8.0.280.0000.00718.46
8.0.270.0070.00017.27
8.0.260.0030.00316.83
8.0.250.0030.00316.92
8.0.240.0070.00316.89
8.0.230.0030.00316.79
8.0.220.0030.00316.89
8.0.210.0030.00316.89
8.0.200.0000.00816.79
8.0.190.0030.00316.88
8.0.180.0020.00516.86
8.0.170.0030.00616.87
8.0.160.0000.00716.74
8.0.150.0040.00416.79
8.0.140.0050.00216.87
8.0.130.0000.00713.23
8.0.120.0070.00016.79
8.0.110.0040.00416.74
8.0.100.0070.00016.88
8.0.90.0050.00316.64
8.0.80.0120.00316.82
8.0.70.0020.00516.68
8.0.60.0080.00016.71
8.0.50.0040.00416.70
8.0.30.0110.00917.32
8.0.20.0120.00817.41
8.0.10.0000.00716.85
8.0.00.0170.00716.73
7.4.330.0050.00015.00
7.4.320.0000.00616.45
7.4.300.0000.00716.60
7.4.290.0000.00716.62
7.4.280.0040.00416.43
7.4.270.0040.00416.66
7.4.260.0060.00316.49
7.4.250.0040.00416.52
7.4.240.0040.00316.44
7.4.230.0000.00716.62
7.4.220.0080.00816.57
7.4.210.0110.00316.59
7.4.200.0070.00016.68
7.4.190.0030.00316.48
7.4.160.0090.00616.20
7.4.150.0120.01217.40
7.4.140.0140.00517.86
7.4.130.0060.01116.66
7.4.120.0120.00716.50
7.4.110.0150.00316.48
7.4.100.0090.00916.45
7.4.90.0030.01516.33
7.4.80.0130.01019.39
7.4.70.0060.01516.35
7.4.60.0100.01316.49
7.4.50.0040.00416.52
7.4.40.0070.00722.77
7.4.30.0140.00316.48
7.4.00.0090.00514.97
7.3.330.0050.00013.23
7.3.320.0050.00013.14
7.3.310.0000.00816.27
7.3.300.0050.00216.23
7.3.290.0080.01116.13
7.3.280.0090.00816.27
7.3.270.0130.01317.40
7.3.260.0140.01116.34
7.3.250.0120.00516.26
7.3.240.0070.01016.38
7.3.230.0030.01416.43
7.3.210.0080.00816.54
7.3.200.0100.00719.39
7.3.190.0150.00616.40
7.3.180.0130.00316.30
7.3.170.0090.00916.27
7.3.160.0090.00616.33
7.3.120.0040.00914.67
7.3.110.0070.01014.89
7.3.100.0030.01214.73
7.3.90.0100.00614.88
7.3.80.0060.00614.88
7.3.70.0080.00814.54
7.3.60.0030.00914.88
7.3.50.0070.00714.73
7.3.40.0090.00314.72
7.3.30.0030.01314.63
7.3.20.0080.01116.36
7.3.10.0110.00716.48
7.3.00.0040.00716.44
7.2.330.0120.00616.87
7.2.320.0070.01916.60
7.2.310.0030.01516.59
7.2.300.0130.00316.70
7.2.290.0170.00716.36
7.2.250.0060.01014.96
7.2.240.0040.01415.03
7.2.230.0060.00914.91
7.2.220.0040.01114.78
7.2.210.0000.01114.78
7.2.200.0070.01115.00
7.2.190.0090.00614.95
7.2.180.0120.00314.73
7.2.170.0000.01415.10
7.2.00.0000.01619.49
7.1.330.0070.00715.77
7.1.320.0110.00015.64
7.1.310.0000.01115.84
7.1.300.0000.01115.69
7.1.290.0030.00915.75
7.1.280.0000.01115.68
7.1.270.0110.00715.90
7.1.260.0100.00715.74
7.1.100.0000.01217.74
7.1.70.0030.01017.03
7.1.60.0040.02119.82
7.1.50.0090.01216.92
7.1.00.0030.07722.44
7.0.200.0030.00716.55
7.0.140.0130.06722.21
7.0.60.0070.07719.87
7.0.50.0030.08317.72
7.0.40.0070.07020.23
7.0.30.0270.03720.09
7.0.20.0270.07720.04
7.0.10.0230.06720.05
7.0.00.0030.08720.19
5.6.280.0100.06721.00
5.6.210.0030.04320.62
5.6.200.0070.04318.25
5.6.190.0100.05720.64
5.6.180.4200.03720.77
5.6.170.0300.06320.57
5.6.160.0030.04320.44
5.6.150.0170.08018.21
5.6.140.0030.03718.21
5.6.130.0000.08718.28
5.6.120.0100.08721.11
5.6.110.0070.07021.10
5.6.100.0070.07720.98
5.6.90.0030.05721.00
5.6.80.0070.07720.41
5.6.70.0200.08020.44
5.5.350.0100.06020.45
5.5.340.0170.03317.99
5.5.330.0030.06020.31
5.5.320.0170.04020.42
5.5.310.0330.06320.31
5.5.300.0070.07017.95
5.5.290.0030.04017.99
5.5.280.0070.04020.88
5.5.270.0070.04020.87
5.5.260.0030.06020.65
5.5.250.0030.06320.62
5.5.240.0130.07320.09
5.4.450.0370.06019.47
5.4.440.0630.05019.61
5.4.430.0170.05319.46
5.4.420.0200.04719.21
5.4.410.0070.05719.29
5.4.400.1700.00018.51
5.4.390.1600.00018.48
5.4.380.0330.04318.74
5.4.370.0430.04018.78
5.4.360.0270.05718.47
5.4.350.0300.05718.74
5.4.340.0330.05018.59
5.4.320.0040.03712.51
5.4.310.0080.04012.50
5.4.300.0080.04512.51
5.4.290.0050.04812.50
5.4.280.0100.04012.40
5.4.270.0070.03512.40
5.4.260.0130.06318.64
5.4.250.0100.05318.85
5.4.240.0300.06318.91
5.4.230.0070.06018.83
5.4.220.0200.05018.90
5.4.210.0170.05019.03
5.4.200.0130.05018.99
5.4.190.0100.07318.76
5.4.180.0200.05318.75
5.4.170.0170.06719.00
5.4.160.0100.05318.75
5.4.150.0070.05718.79
5.4.140.0130.06316.44
5.4.130.0030.05716.55
5.4.120.0100.05016.45
5.4.110.0070.06316.46
5.4.100.0130.05016.38
5.4.90.0100.05016.67
5.4.80.0130.06316.32
5.4.70.0130.05016.46
5.4.60.0130.05016.44
5.4.50.0070.04716.48
5.4.40.0130.04316.44
5.4.30.0100.04716.45
5.4.20.0070.05016.38
5.4.10.0170.05716.38
5.4.00.0070.06315.84
5.3.290.0060.04012.80
5.3.280.0070.06714.59
5.3.270.0200.06714.70
5.3.260.0100.05014.63
5.3.250.0100.04714.83
5.3.240.0030.05714.77
5.3.230.0100.05014.51
5.3.220.0100.06014.65
5.3.210.0070.05314.59
5.3.200.0130.04314.66
5.3.190.0070.05014.64
5.3.180.0130.07314.40
5.3.170.0100.07314.55
5.3.160.0070.06714.47
5.3.150.0070.05014.65
5.3.140.0100.04714.53
5.3.130.0070.05714.78
5.3.120.0070.05714.54
5.3.110.0130.06314.52
5.3.100.0100.06014.22
5.3.90.0070.05314.01
5.3.80.0130.07314.09
5.3.70.0000.05313.85
5.3.60.0100.04714.08
5.3.50.0030.05313.92
5.3.40.0100.06314.04
5.3.30.0070.05013.74
5.3.20.0170.04313.77
5.3.10.0100.04313.84
5.3.00.0070.06013.66
5.2.170.0030.05011.21
5.2.160.0070.03711.22
5.2.150.0070.04011.14
5.2.140.0070.04011.10
5.2.130.0100.04311.09
5.2.120.0070.04010.93
5.2.110.0070.04011.33
5.2.100.0070.04011.19
5.2.90.0100.04711.06
5.2.80.0070.06010.93
5.2.70.0030.05710.93
5.2.60.0130.03311.28
5.2.50.0030.04310.93
5.2.40.0100.03710.83
5.2.30.0170.04710.88
5.2.20.0100.03711.04
5.2.10.0130.03010.84
5.2.00.0100.03710.90
5.1.60.0100.02710.04
5.1.50.0000.03710.01
5.1.40.0070.0339.96
5.1.30.0100.03010.43
5.1.20.0030.03710.54
5.1.10.0100.03010.08
5.1.00.0130.03010.27
5.0.50.0000.0478.64
5.0.40.0030.0378.43
5.0.30.0100.0538.31
5.0.20.0070.0238.17
5.0.10.0130.0208.24
5.0.00.0000.0578.16
4.4.90.0030.0207.50
4.4.80.0100.0277.50
4.4.70.0030.0207.50
4.4.60.0030.0307.50
4.4.50.0000.0337.50
4.4.40.0100.0277.50
4.4.30.0030.0207.50
4.4.20.0030.0207.50
4.4.10.0000.0237.50
4.4.00.0070.0337.50
4.3.110.0070.0307.50
4.3.100.0030.0237.50
4.3.90.0000.0237.50
4.3.80.0030.0437.50
4.3.70.0030.0277.50
4.3.60.0070.0177.50
4.3.50.0070.0237.50
4.3.40.0000.0337.50
4.3.30.0000.0237.50
4.3.20.0030.0207.50
4.3.10.0070.0207.50
4.3.00.0030.0307.50

preferences:
40.18 ms | 401 KiB | 5 Q