3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { use C; public function __construct($foo) { $this->__init($foo); } } class B extends A { public function __construct() { $this->foo = 'bar2'; } } trait C { private $foo; private function __init($foo) { $this->foo = $foo; } } $test = new B('bar'); print_r($test);

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.0120.00316.63
8.3.50.0100.01022.98
8.3.40.0120.00618.88
8.3.30.0100.00318.96
8.3.20.0040.00420.34
8.3.10.0040.00423.52
8.3.00.0040.00419.25
8.2.180.0070.01118.39
8.2.170.0170.00322.96
8.2.160.0090.00620.55
8.2.150.0030.00524.18
8.2.140.0050.00324.66
8.2.130.0040.00426.16
8.2.120.0070.00021.01
8.2.110.0060.00320.30
8.2.100.0110.00018.22
8.2.90.0050.00219.17
8.2.80.0060.00317.97
8.2.70.0060.00317.50
8.2.60.0050.00317.93
8.2.50.0000.00918.07
8.2.40.0030.00718.15
8.2.30.0000.00719.50
8.2.20.0000.00817.57
8.2.10.0000.00818.07
8.2.00.0000.00917.68
8.1.280.0070.01425.92
8.1.270.0000.00823.96
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0030.00723.76
8.1.230.0060.00619.09
8.1.220.0060.00317.74
8.1.210.0080.00018.77
8.1.200.0070.00317.35
8.1.190.0000.00817.35
8.1.180.0050.00318.10
8.1.170.0030.00518.50
8.1.160.0000.00721.93
8.1.150.0040.00418.87
8.1.140.0030.00517.49
8.1.130.0000.00717.45
8.1.120.0050.00317.54
8.1.110.0000.00717.34
8.1.100.0040.00417.37
8.1.90.0050.00217.46
8.1.80.0080.00017.48
8.1.70.0030.00317.40
8.1.60.0080.00217.64
8.1.50.0030.00517.43
8.1.40.0000.00817.56
8.1.30.0080.00017.61
8.1.20.0000.00717.66
8.1.10.0050.00317.62
8.1.00.0040.00417.46
8.0.300.0080.00018.77
8.0.290.0060.00316.63
8.0.280.0080.00018.48
8.0.270.0050.00217.27
8.0.260.0000.00716.95
8.0.250.0050.00316.87
8.0.240.0000.00716.83
8.0.230.0030.00316.98
8.0.220.0070.00016.95
8.0.210.0040.00416.76
8.0.200.0030.00316.84
8.0.190.0040.00716.92
8.0.180.0000.00816.90
8.0.170.0070.00016.74
8.0.160.0050.00216.95
8.0.150.0000.00716.81
8.0.140.0070.00016.94
8.0.130.0000.00613.31
8.0.120.0000.00916.87
8.0.110.0000.00816.92
8.0.100.0050.00316.72
8.0.90.0040.00416.93
8.0.80.0040.01916.89
8.0.70.0080.00016.70
8.0.60.0080.00016.84
8.0.50.0000.00716.89
8.0.30.0090.01016.93
8.0.20.0120.00817.40
8.0.10.0000.00716.98
8.0.00.0070.01416.81
7.4.330.0000.00515.09
7.4.320.0000.00716.52
7.4.300.0000.00616.62
7.4.290.0000.00716.50
7.4.280.0040.00416.60
7.4.270.0030.00316.51
7.4.260.0040.00416.57
7.4.250.0080.00016.37
7.4.240.0050.00216.57
7.4.230.0000.00716.49
7.4.220.0060.01216.60
7.4.210.0120.00516.69
7.4.200.0000.00716.68
7.4.160.0130.01016.71
7.4.150.0070.01117.40
7.4.140.0080.00817.86
7.4.130.0070.01016.50
7.4.120.0130.00316.50
7.4.110.0000.01916.45
7.4.100.0110.00616.64
7.4.90.0090.01216.65
7.4.80.0030.01319.39
7.4.70.0070.01016.57
7.4.60.0080.01416.45
7.4.50.0000.00816.46
7.4.40.0040.01916.39
7.4.30.0090.00616.61
7.4.00.0060.00915.11
7.3.330.0070.00013.22
7.3.320.0000.00513.10
7.3.310.0060.00016.34
7.3.300.0030.00316.30
7.3.290.0140.00616.30
7.3.280.0060.01016.28
7.3.270.0110.00717.40
7.3.260.0100.00716.55
7.3.250.0080.00816.41
7.3.240.0130.01016.37
7.3.230.0090.00916.39
7.3.210.0060.01016.30
7.3.200.0140.00716.39
7.3.190.0080.01216.27
7.3.180.0060.00916.14
7.3.170.0180.00516.39
7.3.160.0090.00616.24
7.2.330.0030.01416.56
7.2.320.0070.01116.53
7.2.310.0030.01516.61
7.2.300.0000.01816.79
7.2.290.0060.01316.58
7.2.00.0030.00919.33
7.1.100.0030.00518.17
7.1.70.0000.00917.26
7.1.60.0100.01419.46
7.1.50.0090.01316.90
7.1.00.0000.07722.48
7.0.200.0120.00314.90
7.0.140.0070.06322.09
7.0.60.0070.08319.91
7.0.50.0070.04717.88
7.0.40.0070.08720.21
7.0.30.0170.04020.09
7.0.20.0200.06320.26
7.0.10.0130.05020.06
7.0.00.0070.04320.16
5.6.280.0070.07021.07
5.6.210.0030.04320.61
5.6.200.0070.05018.29
5.6.190.0070.08720.51
5.6.180.0330.07320.77
5.6.170.0270.07720.39
5.6.160.0070.08720.52
5.6.150.0000.04318.29
5.6.140.0130.07318.23
5.6.130.0130.06018.24
5.6.120.0130.07721.00
5.6.110.0130.07721.12
5.6.100.0130.04721.04
5.6.90.0070.03721.11
5.6.80.0070.08320.51
5.6.70.3900.03720.48
5.5.350.0200.08020.42
5.5.340.0030.09018.04
5.5.330.0030.06320.28
5.5.320.0530.05020.20
5.5.310.0330.07320.35
5.5.300.0000.05718.01
5.5.290.0000.04317.95
5.5.280.0130.07320.86
5.5.270.0070.08320.88
5.5.260.0230.07320.87
5.5.250.0070.07020.70
5.5.240.0330.07020.17
5.4.450.0930.04319.50
5.4.440.0170.04319.54
5.4.430.0330.05019.19
5.4.420.0370.03719.41
5.4.410.0170.04019.36
5.4.400.0300.03719.20
5.4.390.0270.04719.22
5.4.380.0430.04718.83
5.4.370.0230.06018.74
5.4.360.0200.05718.49
5.4.350.0330.05718.79
5.4.340.0330.05318.46
5.4.320.0070.03512.51
5.4.310.0050.03912.50
5.4.300.0030.03912.51
5.4.290.0030.04112.50
5.4.280.0110.03012.39
5.4.270.0050.03912.40
5.4.260.0040.04012.40
5.4.250.0110.03912.40
5.4.240.0020.04012.40
5.4.230.0070.04112.39
5.4.220.0100.03212.39
5.4.210.0070.03512.39
5.4.200.0070.03712.39
5.4.190.0050.03712.39
5.4.180.0050.03712.39
5.4.170.0050.03612.40
5.4.160.0060.03612.40
5.4.150.0050.03712.39
5.4.140.0060.03712.07
5.4.130.0070.03512.06
5.4.120.0060.03712.02
5.4.110.0040.03712.02
5.4.100.0040.03712.02
5.4.90.0040.03812.02
5.4.80.0070.03512.02
5.4.70.0060.03412.01
5.4.60.0070.03312.01
5.4.50.0070.03312.01
5.4.40.0070.03412.00
5.4.30.0050.03612.00
5.4.20.0060.03512.00
5.4.10.0040.03712.00
5.4.00.0080.03211.48
5.3.290.0050.04112.80
5.3.280.0060.03712.71
5.3.270.0100.04412.72
5.3.260.0030.04112.72
5.3.250.0050.03912.72
5.3.240.0050.03712.72
5.3.230.0060.03712.70
5.3.220.0040.04012.68
5.3.210.0060.03812.68
5.3.200.0080.03412.68
5.3.190.0060.03612.68
5.3.180.0040.03912.68
5.3.170.0050.03712.67
5.3.160.0140.02912.68
5.3.150.0080.03612.67
5.3.140.0050.03712.66
5.3.130.0070.03812.66
5.3.120.0100.03712.66
5.3.110.0080.03912.66
5.3.100.0130.02912.12
5.3.90.0070.03612.10
5.3.80.0050.05012.09
5.3.70.0060.04912.09
5.3.60.0080.03712.08
5.3.50.0030.03912.02
5.3.40.0080.03412.02
5.3.30.0080.03311.98
5.3.20.0030.03811.76
5.3.10.0090.03111.73
5.3.00.0040.03711.71
5.2.170.0060.0299.21
5.2.160.0060.0289.21
5.2.150.0030.0329.21
5.2.140.0040.0319.21
5.2.130.0040.0309.16
5.2.120.0060.0279.17
5.2.110.0040.0309.18
5.2.100.0050.0299.18
5.2.90.0060.0279.18
5.2.80.0080.0289.17
5.2.70.0050.0309.16
5.2.60.0030.0329.13
5.2.50.0060.0309.10
5.2.40.0040.0299.07
5.2.30.0040.0309.04
5.2.20.0060.0279.04
5.2.10.0050.0288.94
5.2.00.0040.0288.80
5.1.60.0050.0228.09
5.1.50.0070.0228.09
5.1.40.0050.0238.06
5.1.30.0050.0258.41
5.1.20.0050.0258.44
5.1.10.0030.0278.16
5.1.00.0030.0328.16
5.0.50.0060.0226.64
5.0.40.0030.0206.49
5.0.30.0040.0336.30
5.0.20.0050.0176.27
5.0.10.0020.0216.25
5.0.00.0060.0326.25
4.4.90.0040.0194.78
4.4.80.0020.0164.76
4.4.70.0040.0144.75
4.4.60.0060.0124.75
4.4.50.0000.0184.77
4.4.40.0030.0244.70
4.4.30.0030.0164.76
4.4.20.0050.0134.84
4.4.10.0020.0174.85
4.4.00.0030.0244.76
4.3.110.0020.0164.67
4.3.100.0020.0154.66
4.3.90.0040.0164.63
4.3.80.0020.0254.59
4.3.70.0020.0154.63
4.3.60.0000.0174.63
4.3.50.0050.0134.63
4.3.40.0020.0244.54
4.3.30.0000.0223.30
4.3.20.0020.0203.28
4.3.10.0020.0163.23
4.3.00.0130.02718.56

preferences:
39.83 ms | 401 KiB | 5 Q