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(); echo "Messing with variable"; $bar->mess($foo); // bar messes with foo's baz, which should be private echo "\nFoo looks at its own $baz:"; $foo->out('Foo'); // foo looks at its own baz, which remains unchanged echo "\nBar looks at Foo's $baz:"; $bar->peek($foo, 'Foo'); // yet when bar looks at foo's baz (which is shouldn't see) we get the change from above echo "\n\nFoo can't look at Bar's $baz"; $foo->peek($bar, 'Bar');

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.0130.00616.75
8.3.60.0170.00018.50
8.3.50.0120.00721.95
8.3.40.0070.01318.76
8.3.30.0150.00319.18
8.3.20.0070.00020.30
8.3.10.0040.00423.58
8.3.00.0040.00419.51
8.2.180.0030.01616.74
8.2.170.0090.01222.96
8.2.160.0130.00020.53
8.2.150.0060.00324.18
8.2.140.0000.00824.66
8.2.130.0000.00826.16
8.2.120.0070.00022.23
8.2.110.0090.00022.24
8.2.100.0070.00417.75
8.2.90.0080.00019.21
8.2.80.0000.00817.97
8.2.70.0060.00317.63
8.2.60.0040.00417.80
8.2.50.0090.00318.07
8.2.40.0000.00819.92
8.2.30.0040.00818.06
8.2.20.0100.00017.75
8.2.10.0030.00517.95
8.2.00.0100.00017.64
8.1.280.0320.00025.92
8.1.270.0040.00423.92
8.1.260.0000.00826.35
8.1.250.0000.00828.09
8.1.240.0090.00019.57
8.1.230.0060.00617.64
8.1.220.0050.00317.74
8.1.210.0040.00418.77
8.1.200.0040.00417.35
8.1.190.0000.00817.35
8.1.180.0080.00018.10
8.1.170.0000.00918.57
8.1.160.0000.00721.93
8.1.150.0070.00018.95
8.1.140.0000.00717.42
8.1.130.0060.00317.75
8.1.120.0000.00717.45
8.1.110.0040.00417.47
8.1.100.0000.00717.43
8.1.90.0000.00717.48
8.1.80.0030.00417.37
8.1.70.0050.00317.43
8.1.60.0030.00617.62
8.1.50.0000.00917.58
8.1.40.0040.00417.45
8.1.30.0040.00417.66
8.1.20.0000.00817.57
8.1.10.0000.00817.57
8.1.00.0040.00417.52
8.0.300.0000.00718.77
8.0.290.0000.00716.75
8.0.280.0070.00018.47
8.0.270.0020.00517.30
8.0.260.0000.00817.21
8.0.250.0030.00316.93
8.0.240.0000.00616.92
8.0.230.0000.00717.06
8.0.220.0030.00316.93
8.0.210.0050.00316.84
8.0.200.0000.00616.90
8.0.190.0040.00416.94
8.0.180.0040.00416.87
8.0.170.0030.00517.00
8.0.160.0030.00616.95
8.0.150.0040.00416.81
8.0.140.0000.00716.98
8.0.130.0050.00013.39
8.0.120.0030.00316.91
8.0.110.0000.00717.04
8.0.100.0000.00716.86
8.0.90.0040.00416.95
8.0.80.0040.01516.85
8.0.70.0070.00016.91
8.0.60.0050.00316.86
8.0.50.0000.00716.85
8.0.30.0140.00617.20
8.0.20.0120.00817.40
8.0.10.0040.00417.02
8.0.00.0130.00416.72
7.4.330.0050.00015.00
7.4.320.0050.00216.52
7.4.300.0000.00616.64
7.4.290.0000.00716.42
7.4.280.0000.00716.46
7.4.270.0000.00716.66
7.4.260.0000.00716.45
7.4.250.0080.00016.48
7.4.240.0060.00116.56
7.4.230.0070.00016.64
7.4.220.0120.00916.62
7.4.210.0060.00716.39
7.4.200.0000.00816.45
7.4.160.0170.00716.80
7.4.150.0090.00917.40
7.4.140.0110.00817.86
7.4.130.0140.01416.42
7.4.120.0090.00916.62
7.4.110.0090.00916.67
7.4.100.0150.00716.52
7.4.90.0060.01116.56
7.4.80.0000.01819.39
7.4.70.0100.00716.44
7.4.60.0030.01716.45
7.4.50.0030.00616.37
7.4.40.0120.00616.40
7.4.30.0080.00816.43
7.4.00.0080.00915.04
7.3.330.0080.00013.48
7.3.320.0030.00313.28
7.3.310.0000.00716.25
7.3.300.0000.00616.42
7.3.290.0110.00416.43
7.3.280.0090.00916.45
7.3.270.0080.00817.40
7.3.260.0060.01116.61
7.3.240.0080.00816.57
7.3.230.0100.00616.45
7.3.210.0030.01316.65
7.3.200.0040.01819.39
7.3.190.0090.00916.48
7.3.180.0210.00316.64
7.3.170.0090.00616.43
7.3.160.0090.01216.46
7.3.120.0090.00714.97
7.3.110.0060.01214.86
7.3.100.0090.00514.91
7.3.90.0100.00514.93
7.3.80.0070.00914.87
7.3.70.0030.00914.87
7.3.60.0050.01214.75
7.3.50.0040.01014.80
7.3.40.0070.00514.92
7.3.30.0060.00614.70
7.3.20.0050.00816.74
7.3.10.0070.00716.58
7.3.00.0060.00816.68
7.2.330.0150.00316.51
7.2.320.0090.01416.38
7.2.310.0060.01216.77
7.2.300.0070.01016.63
7.2.290.0080.00816.53
7.2.250.0110.00615.24
7.2.240.0060.01215.16
7.2.230.0070.01115.11
7.2.220.0090.00815.08
7.2.210.0080.00815.04
7.2.200.0000.01515.09
7.2.190.0060.00814.96
7.2.180.0060.00815.09
7.2.170.0070.00715.13
7.2.130.0080.00816.84
7.2.120.0030.01316.89
7.2.110.0100.00716.80
7.2.100.0130.00316.95
7.2.90.0070.01117.03
7.2.80.0080.01116.65
7.2.70.0100.01016.73
7.2.60.0100.00516.83
7.2.50.0120.00616.84
7.2.40.0130.00316.90
7.2.30.0090.00916.59
7.2.20.0060.00916.84
7.2.10.0110.00416.73
7.2.00.0070.00918.03
7.1.330.0100.00615.70
7.1.320.0060.00815.88
7.1.310.0050.00915.78
7.1.300.0100.00415.84
7.1.290.0000.01215.75
7.1.280.0070.00815.93
7.1.270.0040.01015.83
7.1.260.0060.00915.85
7.1.250.0150.00515.43
7.1.240.0100.01015.91
7.1.230.0030.01215.62
7.1.220.0060.01315.84
7.1.210.0100.00315.66
7.1.200.0060.00915.75
7.1.190.0080.00815.47
7.1.180.0100.00315.74
7.1.170.0080.00815.75
7.1.160.0110.00315.81
7.1.150.0080.00815.84
7.1.140.0100.00715.71
7.1.130.0160.00315.74
7.1.120.0140.00315.70
7.1.110.0120.00815.62
7.1.100.0070.00717.08
7.1.90.0040.00815.55
7.1.80.0130.00415.48
7.1.70.0100.00816.29
7.1.60.0130.00517.56
7.1.50.0100.01016.32
7.1.40.0150.00315.89
7.1.30.0060.00615.70
7.1.20.0130.00315.77
7.1.10.0060.01015.48
7.1.00.0100.03819.02
7.0.330.0120.00315.56
7.0.320.0100.00715.34
7.0.310.0170.00315.16
7.0.300.0090.00914.88
7.0.290.0100.01014.91
7.0.280.0110.00615.11
7.0.270.0090.00915.20
7.0.260.0170.00315.58
7.0.250.0130.00715.39
7.0.240.0080.00815.33
7.0.230.0100.00315.45
7.0.220.0150.00415.46
7.0.210.0080.00615.39
7.0.200.0050.00715.95
7.0.190.0030.01315.44
7.0.180.0090.00915.51
7.0.170.0140.00715.44
7.0.160.0120.00515.42
7.0.150.0040.01215.32
7.0.140.0070.04118.69
7.0.130.0070.00715.25
7.0.120.0160.00315.36
7.0.110.0140.00415.16
7.0.100.0170.00015.20
7.0.90.0090.00315.11
7.0.80.0060.00915.48
7.0.70.0190.00315.09
7.0.60.0070.02517.60
7.0.50.0090.03016.72
7.0.40.0090.03216.82
7.0.30.0320.03816.64
7.0.20.0140.02816.69
7.0.10.0090.04016.72
7.0.00.0100.04216.87
5.6.380.0080.00514.14
5.6.370.0070.00714.57
5.6.360.0110.00314.19
5.6.350.0030.00914.25
5.6.340.0100.00414.61
5.6.330.0090.01314.39
5.6.320.0100.00514.15
5.6.310.0070.01114.13
5.6.300.0070.00714.37
5.6.290.0080.00814.18
5.6.280.0040.04317.76
5.6.270.0130.00314.50
5.6.260.0060.00914.16
5.6.250.0040.00714.23
5.6.240.0140.00314.36
5.6.230.0080.01314.46
5.6.220.0060.00913.99
5.6.210.0070.04317.28
5.6.200.0050.03316.30
5.6.190.0080.03017.59
5.6.180.0070.02817.32
5.6.170.0150.03517.23
5.6.160.0090.02917.10
5.6.150.0080.04516.28
5.6.140.0030.02916.15
5.6.130.0070.04316.27
5.6.120.0080.04817.66
5.6.110.0080.04617.65
5.6.100.0060.05417.51
5.6.90.0060.03717.36
5.6.80.0070.02517.30
5.6.70.0090.00314.11
5.6.60.0100.00713.98
5.6.50.0080.01113.98
5.6.40.0070.01014.20
5.6.30.0150.00414.15
5.6.20.0170.00014.01
5.6.10.0100.00714.18
5.6.00.0110.00514.04
5.5.380.0030.00711.60
5.5.370.0070.00411.60
5.5.360.0060.00911.60
5.5.350.0030.02516.03
5.5.340.0050.02514.79
5.5.330.0080.04515.93
5.5.320.0220.04115.98
5.5.310.0180.03915.97
5.5.300.0060.03214.77
5.5.290.0060.03214.83
5.5.280.0050.04216.24
5.5.270.0030.03016.20
5.5.260.0090.02216.17
5.5.250.0060.03316.16
5.5.240.0210.03715.90
5.5.230.0050.00511.60
5.5.220.0090.00011.60
5.5.210.0040.00411.60
5.5.200.0060.00611.60
5.5.190.0080.00311.60
5.5.180.0110.00311.60
5.5.170.0110.00411.60
5.5.160.0130.00311.60
5.5.150.0030.01011.60
5.5.140.0110.00211.60
5.5.130.0080.00511.60
5.5.120.0110.00511.60
5.5.110.0090.00611.60
5.5.100.0090.00511.60
5.5.90.0090.00011.60
5.5.80.0050.00611.60
5.5.70.0140.00011.60
5.5.60.0070.00711.60
5.5.50.0090.00911.60
5.5.40.0060.00811.60
5.5.30.0160.00011.60
5.5.20.0040.01111.60
5.5.10.0080.00811.60
5.5.00.0000.01211.60
5.4.450.0410.04115.53
5.4.440.0470.02815.54
5.4.430.0470.03815.45
5.4.420.0380.00515.40
5.4.410.0370.00215.51
5.4.400.0330.00315.43
5.4.390.0350.00215.34
5.4.380.0340.00215.42
5.4.370.0310.00415.38
5.4.360.0320.00415.32
5.4.350.0410.00015.33
5.4.340.0030.02511.81
5.4.330.0080.00311.60
5.4.320.0080.02112.06
5.4.310.0040.02512.06
5.4.300.0070.02312.06
5.4.290.0070.02112.05
5.4.280.0040.02212.00
5.4.270.0060.02212.00
5.4.260.0070.02012.00
5.4.250.0060.02312.01
5.4.240.0070.02312.00
5.4.230.0070.02012.00
5.4.220.0060.02212.00
5.4.210.0060.02012.00
5.4.200.0070.02212.00
5.4.190.0040.02312.00
5.4.180.0050.02012.00
5.4.170.0060.02112.00
5.4.160.0050.01912.00
5.4.150.0050.02212.00
5.4.140.0050.02311.84
5.4.130.0020.02411.84
5.4.120.0060.02211.81
5.4.110.0060.02111.81
5.4.100.0080.01811.81
5.4.90.0060.02211.81
5.4.80.0060.02211.81
5.4.70.0090.02011.81
5.4.60.0080.01711.81
5.4.50.0070.01811.81
5.4.40.0050.02411.80
5.4.30.0070.01911.80
5.4.20.0080.02111.80
5.4.10.0010.02511.80
5.4.00.0060.02211.55
5.3.290.0040.02412.20
5.3.280.0020.02312.15
5.3.270.0050.02312.16
5.3.260.0020.02412.16
5.3.250.0030.02212.16
5.3.240.0050.02012.16
5.3.230.0040.02212.15
5.3.220.0030.02312.14
5.3.210.0050.02312.14
5.3.200.0040.02212.14
5.3.190.0060.02112.14
5.3.180.0090.01812.14
5.3.170.0100.01912.14
5.3.160.0070.02412.13
5.3.150.0040.02012.13
5.3.140.0050.02112.13
5.3.130.0080.02012.13
5.3.120.0050.02212.13
5.3.110.0050.02112.13
5.3.100.0070.01811.86
5.3.90.0070.02311.86
5.3.80.0040.02211.85
5.3.70.0020.02611.85
5.3.60.0040.02111.84
5.3.50.0060.02211.82
5.3.40.0070.01811.82
5.3.30.0040.02211.80
5.3.20.0070.02111.69
5.3.10.0070.01811.67
5.3.00.0050.02011.66
5.2.170.0030.01810.41
5.2.160.0030.01810.42
5.2.150.0040.01810.41
5.2.140.0040.02110.41
5.2.130.0040.01710.39
5.2.120.0020.01810.39
5.2.110.0020.02110.40
5.2.100.0020.01710.39
5.2.90.0040.01810.39
5.2.80.0070.01410.39
5.2.70.0040.01910.39
5.2.60.0080.01410.37
5.2.50.0040.01910.35
5.2.40.0040.01610.34
5.2.30.0040.01910.33
5.2.20.0040.01810.33
5.2.10.0030.01810.28
5.2.00.0050.01810.21
5.1.60.0040.0139.86
5.1.50.0060.0149.86
5.1.40.0060.0139.85
5.1.30.0020.01710.02
5.1.20.0030.01710.03
5.1.10.0070.0129.89
5.1.00.0030.0169.89
5.0.50.0010.0149.13
5.0.40.0040.0119.06
5.0.30.0050.0168.97
5.0.20.0060.0098.95
5.0.10.0010.0138.94
5.0.00.0040.0168.94
4.4.90.0040.0098.19
4.4.80.0050.0098.18
4.4.70.0040.0098.18
4.4.60.0010.0118.18
4.4.50.0010.0118.19
4.4.40.0050.0138.15
4.4.30.0040.0088.18
4.4.20.0020.0098.22
4.4.10.0020.0098.22
4.4.00.0030.0148.18
4.3.110.0010.0128.13
4.3.100.0030.0098.13
4.3.90.0030.0098.12
4.3.80.0010.0148.09
4.3.70.0020.0098.12
4.3.60.0030.0088.11
4.3.50.0030.0098.11
4.3.40.0020.0148.07
4.3.30.0030.0117.45
4.3.20.0030.0087.44
4.3.10.0010.0107.42
4.3.00.0080.0139.46

preferences:
68.32 ms | 401 KiB | 5 Q