3v4l.org

run code in 300+ PHP versions simultaneously
<?php class InCommon { private $baz = 'foo'; public function out($pref){ echo "\n".$pref.'::$baz = '.$this->baz; } } class Foo extends InCommon { public function peek($target, $pref){ echo "\n".'peek @'.$pref.'::$baz = '.$target->baz; } } class Bar extends InCommon { public function peek($target, $pref){ echo "\n".'peek @'.$pref.'::$baz = '.$target->baz; } public function mess($target){ $target->baz = 'cats'; } } $foo = new Foo(); $bar = new Bar(); $bar->mess($foo); // bar messes with Foo's $baz, which should be private $foo->out('Foo'); // Foo's internal $baz remains unchanged $bar->peek($foo, 'Foo'); // however, bar continues to see its modification to Foo::$baz $foo->peek($bar, 'Bar'); // Foo tries the same thing, but it sees nothing of Bar::$baz -- which it shouldn't

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.70.0110.01116.75
8.3.60.0170.00318.52
8.3.50.0090.00922.18
8.3.40.0070.01118.84
8.3.30.0000.01419.21
8.3.20.0040.00420.21
8.3.10.0040.00423.48
8.3.00.0000.00819.26
8.2.180.0070.00725.92
8.2.170.0080.00818.89
8.2.160.0180.00422.96
8.2.150.0080.00025.66
8.2.140.0040.00424.66
8.2.130.0000.00726.16
8.2.120.0110.00420.88
8.2.110.0030.00622.37
8.2.100.0030.00917.78
8.2.90.0050.00319.23
8.2.80.0060.00317.97
8.2.70.0080.00017.63
8.2.60.0000.00817.87
8.2.50.0000.00918.07
8.2.40.0030.00518.16
8.2.30.0000.00817.95
8.2.20.0000.00817.60
8.2.10.0000.00718.09
8.2.00.0090.00017.63
8.1.280.0090.00625.92
8.1.270.0060.00323.62
8.1.260.0040.00426.35
8.1.250.0120.00328.09
8.1.240.0060.00321.21
8.1.230.0110.00017.52
8.1.220.0050.00317.74
8.1.210.0030.00718.77
8.1.200.0070.00317.23
8.1.190.0060.00317.35
8.1.180.0100.00018.10
8.1.170.0000.00818.70
8.1.160.0060.00322.01
8.1.150.0040.00418.96
8.1.140.0050.00317.47
8.1.130.0030.00617.88
8.1.120.0020.00517.45
8.1.110.0050.00217.43
8.1.100.0040.00417.42
8.1.90.0030.00517.34
8.1.80.0000.00717.35
8.1.70.0000.00817.35
8.1.60.0000.00817.66
8.1.50.0040.00417.56
8.1.40.0000.00717.40
8.1.30.0040.00417.68
8.1.20.0020.00517.70
8.1.10.0080.00017.63
8.1.00.0040.00417.57
8.0.300.0040.00418.77
8.0.290.0080.00016.88
8.0.280.0000.00718.38
8.0.270.0000.00717.20
8.0.260.0060.00017.23
8.0.250.0040.00417.05
8.0.240.0080.00017.06
8.0.230.0070.00017.06
8.0.220.0000.00716.90
8.0.210.0040.00416.87
8.0.200.0000.00616.95
8.0.190.0040.00416.93
8.0.180.0000.00717.02
8.0.170.0040.00416.89
8.0.160.0050.00316.83
8.0.150.0030.00316.78
8.0.140.0030.00416.80
8.0.130.0000.00513.40
8.0.120.0070.00016.81
8.0.110.0040.00416.87
8.0.100.0000.00717.05
8.0.90.0070.00016.96
8.0.80.0050.01016.98
8.0.70.0000.00816.76
8.0.60.0030.00517.01
8.0.50.0040.00416.95
8.0.30.0100.00817.18
8.0.20.0090.01017.40
8.0.10.0040.00417.08
8.0.00.0070.01116.75
7.4.330.0000.00615.00
7.4.320.0030.00316.61
7.4.300.0000.00616.65
7.4.290.0030.00316.46
7.4.280.0080.00016.63
7.4.270.0070.00016.41
7.4.260.0030.00316.59
7.4.250.0000.00816.50
7.4.240.0010.00616.62
7.4.230.0000.00716.41
7.4.220.0140.01116.63
7.4.210.0070.01016.64
7.4.200.0000.00916.50
7.4.160.0060.01816.45
7.4.150.0150.00317.40
7.4.140.0120.00617.86
7.4.130.0110.00616.54
7.4.120.0100.00716.46
7.4.110.0070.01016.65
7.4.100.0140.00316.39
7.4.90.0060.01016.53
7.4.80.0040.01319.39
7.4.70.0060.01016.50
7.4.60.0100.01016.55
7.4.50.0040.00016.63
7.4.40.0080.00916.67
7.4.30.0060.01016.41
7.4.00.0090.00615.09
7.3.330.0030.00613.18
7.3.320.0060.00013.15
7.3.310.0040.00416.25
7.3.300.0030.00316.41
7.3.290.0110.00316.29
7.3.280.0090.00916.35
7.3.270.0090.00917.40
7.3.260.0110.00616.34
7.3.250.0080.00816.50
7.3.240.0130.00316.36
7.3.230.0150.00316.39
7.3.210.0000.01516.36
7.3.200.0130.00719.39
7.3.190.0040.01416.52
7.3.180.0130.00316.29
7.3.170.0000.01516.47
7.3.160.0130.00316.34
7.3.120.0060.01414.98
7.3.110.0070.00714.89
7.3.100.0100.00614.95
7.3.90.0130.00315.03
7.3.80.0100.00314.85
7.3.70.0130.00314.95
7.3.60.0070.00714.86
7.3.50.0070.00714.70
7.3.40.0070.00714.68
7.3.30.0000.01514.85
7.3.20.0030.00616.86
7.3.10.0030.01016.70
7.3.00.0070.00716.45
7.2.330.0040.01416.80
7.2.320.0110.00716.80
7.2.310.0060.01016.39
7.2.300.0040.01216.70
7.2.290.0030.01516.54
7.2.250.0140.00715.06
7.2.240.0070.01014.83
7.2.230.0160.00015.09
7.2.220.0070.01114.94
7.2.210.0040.01415.23
7.2.200.0070.01015.06
7.2.190.0030.01015.08
7.2.180.0140.00414.97
7.2.170.0070.00415.00
7.2.60.0070.00716.85
7.2.00.0060.00619.25
7.1.330.0040.01115.75
7.1.320.0060.00616.05
7.1.310.0030.01215.75
7.1.300.0080.00615.82
7.1.290.0040.01115.71
7.1.280.0070.00715.91
7.1.270.0120.00315.94
7.1.260.0070.00315.68
7.1.200.0040.01115.55
7.1.100.0650.00316.00
7.1.70.0000.00716.88
7.1.60.0000.01819.32
7.1.50.0000.02216.68
7.1.00.0070.07022.40
7.0.200.0000.00916.44
7.0.140.0030.07722.21
7.0.60.0130.07719.80
7.0.50.0070.07717.91
7.0.40.0200.07019.96
7.0.30.0230.04320.10
7.0.20.0270.07720.30
7.0.10.0030.05020.31
7.0.00.0170.07720.23
5.6.280.0030.07321.03
5.6.210.0130.04720.71
5.6.200.0070.05718.25
5.6.190.0030.04320.77
5.6.180.0400.06320.59
5.6.170.0270.04720.54
5.6.160.0030.08720.52
5.6.150.0000.09018.14
5.6.140.0070.05018.13
5.6.130.0030.04018.14
5.6.120.0030.05020.95
5.6.110.0030.07320.92
5.6.100.0130.08021.05
5.6.90.0070.05320.98
5.6.80.0070.03720.36
5.5.350.0130.04020.54
5.5.340.0070.03318.07
5.5.330.0070.08720.13
5.5.320.0300.05020.35
5.5.310.0270.08320.34
5.5.300.0100.05017.98
5.5.290.0070.08017.98
5.5.280.0030.05320.81
5.5.270.0200.07020.79
5.5.260.0070.08320.77
5.5.250.0170.05720.63
5.5.240.0270.07020.25
5.4.450.1270.06719.61
5.4.440.0970.05319.16
5.4.430.1100.06719.46
5.4.420.0870.00019.57
5.4.410.0900.00019.41
5.4.400.0830.00019.13
5.4.390.0800.00019.01
5.4.380.0730.00019.26
5.4.370.0830.00019.04
5.4.360.0600.00019.16
5.4.350.0630.00019.16
5.4.340.0060.03412.02
5.4.320.0090.03312.51
5.4.310.0080.03912.51
5.4.300.0090.03612.51
5.4.290.0040.04012.50
5.4.280.0090.03412.41
5.4.270.0080.04012.41
5.4.260.0090.03612.40
5.4.250.0090.03812.40
5.4.240.0080.03512.41
5.4.230.0090.03512.40
5.4.220.0060.03612.39
5.4.210.0040.03712.39
5.4.200.0100.03412.39
5.4.190.0040.04012.39
5.4.180.0110.03412.39
5.4.170.0060.03612.40
5.4.160.0040.03812.40
5.4.150.0050.03612.39
5.4.140.0080.04012.08
5.4.130.0100.03212.07
5.4.120.0040.03712.02
5.4.110.0050.03612.02
5.4.100.0030.03712.02
5.4.90.0030.03912.02
5.4.80.0040.03812.02
5.4.70.0020.03812.02
5.4.60.0060.03412.02
5.4.50.0060.04112.02
5.4.40.0030.03712.00
5.4.30.0070.03712.00
5.4.20.0040.03612.00
5.4.10.0100.03612.00
5.4.00.0100.03711.49
5.3.290.0030.04412.80
5.3.280.0060.03712.71
5.3.270.0040.04212.72
5.3.260.0060.03912.72
5.3.250.0020.04112.71
5.3.240.0070.03812.72
5.3.230.0050.04012.71
5.3.220.0070.03812.68
5.3.210.0080.03612.68
5.3.200.0100.03712.68
5.3.190.0020.04212.68
5.3.180.0040.03812.67
5.3.170.0090.03812.67
5.3.160.0100.03712.67
5.3.150.0050.03912.67
5.3.140.0100.03612.66
5.3.130.0050.04112.66
5.3.120.0060.03812.65
5.3.110.0050.03812.66
5.3.100.0100.03212.13
5.3.90.0080.03412.11
5.3.80.0090.03612.10
5.3.70.0060.04712.10
5.3.60.0070.03812.09
5.3.50.0040.04012.03
5.3.40.0060.04412.05
5.3.30.0080.03211.99
5.3.20.0070.03311.77
5.3.10.0070.03911.74
5.3.00.0090.03711.72
5.2.170.0080.0279.23
5.2.160.0070.0369.23
5.2.150.0060.0329.23
5.2.140.0090.0329.23
5.2.130.0040.0309.19
5.2.120.0060.0299.18
5.2.110.0060.0289.19
5.2.100.0070.0269.19
5.2.90.0030.0319.19
5.2.80.0030.0349.18
5.2.70.0030.0399.19
5.2.60.0050.0329.13
5.2.50.0070.0339.10
5.2.40.0050.0319.08
5.2.30.0030.0319.06
5.2.20.0080.0259.05
5.2.10.0050.0278.96
5.2.00.0050.0358.82
5.1.60.0060.0248.10
5.1.50.0090.0218.10
5.1.40.0030.0298.07
5.1.30.0040.0278.43
5.1.20.0070.0248.45
5.1.10.0030.0288.17
5.1.00.0080.0228.18
5.0.50.0010.0236.65
5.0.40.0020.0206.51
5.0.30.0020.0326.32
5.0.20.0040.0186.29
5.0.10.0030.0206.27
5.0.00.0020.0316.27
4.4.90.0020.0154.78
4.4.80.0010.0174.76
4.4.70.0030.0144.75
4.4.60.0040.0144.75
4.4.50.0010.0174.77
4.4.40.0040.0244.71
4.4.30.0020.0154.76
4.4.20.0030.0154.84
4.4.10.0040.0144.85
4.4.00.0020.0254.76
4.3.110.0020.0164.67
4.3.100.0020.0184.67
4.3.90.0010.0164.63
4.3.80.0020.0254.59
4.3.70.0010.0184.63
4.3.60.0010.0164.63
4.3.50.0020.0194.63
4.3.40.0030.0234.54
4.3.30.0020.0163.30
4.3.20.0020.0193.28
4.3.10.0010.0183.23
4.3.00.0200.0207.37

preferences:
58.72 ms | 401 KiB | 5 Q