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 { } 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); $foo->out('Foo'); $bar->peek($foo, 'Foo'); $bar->out('Bar'); $foo->out('Foo'); $foo->peek($bar, 'Bar'); $bar->peek($foo, '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.0130.01018.43
8.3.50.0110.00722.03
8.3.40.0100.00719.00
8.3.30.0070.01019.16
8.3.20.0070.00020.16
8.3.10.0080.00020.65
8.3.00.0040.00419.38
8.2.180.0160.00316.63
8.2.170.0040.01222.96
8.2.160.0060.00920.35
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0080.00026.16
8.2.120.0040.00422.08
8.2.110.0060.00321.17
8.2.100.0080.00418.03
8.2.90.0110.00318.97
8.2.80.0000.00817.97
8.2.70.0040.00417.74
8.2.60.0000.00818.03
8.2.50.0040.00418.07
8.2.40.0040.00418.16
8.2.30.0040.00419.13
8.2.20.0050.00317.74
8.2.10.0050.00318.07
8.2.00.0060.00317.71
8.1.280.0110.00425.92
8.1.270.0040.00423.97
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0100.00521.93
8.1.230.0070.00420.89
8.1.220.0000.00817.74
8.1.210.0040.00418.77
8.1.200.0080.00317.23
8.1.190.0000.00817.23
8.1.180.0080.00018.10
8.1.170.0080.00418.39
8.1.160.0050.00222.04
8.1.150.0070.00018.84
8.1.140.0060.00317.33
8.1.130.0000.00717.79
8.1.120.0040.00417.50
8.1.110.0050.00517.36
8.1.100.0000.00717.48
8.1.90.0070.00317.42
8.1.80.0000.00717.46
8.1.70.0030.00517.38
8.1.60.0040.00417.48
8.1.50.0040.00417.54
8.1.40.0050.00317.55
8.1.30.0040.00417.64
8.1.20.0050.00317.65
8.1.10.0040.00417.48
8.1.00.0120.00017.37
8.0.300.0060.00318.77
8.0.290.0070.00016.75
8.0.280.0070.00018.39
8.0.270.0000.00717.23
8.0.260.0000.00717.18
8.0.250.0030.00317.02
8.0.240.0030.00317.02
8.0.230.0050.00317.04
8.0.220.0030.00316.95
8.0.210.0000.00817.00
8.0.200.0000.00716.91
8.0.190.0030.00517.02
8.0.180.0040.00416.89
8.0.170.0080.00016.85
8.0.160.0030.00316.88
8.0.150.0000.00716.94
8.0.140.0040.00416.93
8.0.130.0000.00613.32
8.0.120.0030.00516.83
8.0.110.0000.00716.82
8.0.100.0000.00716.96
8.0.90.0000.00816.86
8.0.80.0050.01616.95
8.0.70.0030.00516.79
8.0.60.0000.00716.80
8.0.50.0000.00716.78
8.0.30.0120.00917.25
8.0.20.0050.01417.40
8.0.10.0020.00516.89
8.0.00.0120.00616.76
7.4.330.0050.00015.12
7.4.320.0030.00316.57
7.4.300.0000.00616.40
7.4.290.0030.00316.46
7.4.280.0030.00316.51
7.4.270.0030.00316.58
7.4.260.0070.00016.42
7.4.250.0040.00416.57
7.4.240.0050.00216.56
7.4.230.0000.00716.68
7.4.220.0090.00916.54
7.4.210.0060.00916.54
7.4.200.0000.00716.58
7.4.160.0040.01116.44
7.4.150.0130.00617.40
7.4.140.0130.00717.86
7.4.130.0120.00416.53
7.4.120.0070.01216.51
7.4.110.0030.01316.50
7.4.100.0070.01016.69
7.4.90.0080.00816.63
7.4.80.0160.00319.37
7.4.70.0090.00916.37
7.4.60.0070.01016.34
7.4.50.0000.00816.50
7.4.40.0130.00616.55
7.4.30.0140.01216.52
7.4.00.0070.00714.88
7.3.330.0000.00513.22
7.3.320.0030.00313.21
7.3.310.0030.00316.33
7.3.300.0000.00716.43
7.3.290.0130.00716.35
7.3.280.0080.00916.36
7.3.270.0120.01617.40
7.3.260.0090.00916.48
7.3.250.0090.00816.53
7.3.240.0100.00716.44
7.3.230.0070.01016.39
7.3.210.0070.01016.38
7.3.200.0130.00919.39
7.3.190.0150.00716.49
7.3.180.0000.01816.57
7.3.170.0100.00616.43
7.3.160.0090.00916.40
7.2.330.0090.00916.66
7.2.320.0000.01816.67
7.2.310.0070.01016.75
7.2.300.0100.00716.66
7.2.290.0040.01416.74
7.2.60.0000.01516.91
7.1.200.0060.00315.70
7.1.70.0030.00617.09
7.1.60.0000.01017.29
7.1.50.0100.01016.86
7.1.00.0100.07022.29
7.0.200.0040.01116.82
7.0.140.0100.06722.10
7.0.60.0070.05719.88
7.0.50.0030.04017.88
7.0.40.0100.07320.02
7.0.30.0200.05020.25
7.0.20.0270.06720.19
7.0.10.0070.08720.19
7.0.00.0100.04720.11
5.6.280.0100.06721.13
5.6.210.0070.08320.49
5.6.200.0000.05018.18
5.6.190.0030.04720.67
5.6.180.0430.05720.61
5.6.170.0330.04020.46
5.6.160.0000.04320.44
5.6.150.0030.08718.23
5.6.140.0070.03718.17
5.6.130.0100.07318.27
5.6.120.0000.05320.85
5.6.110.0200.06021.02
5.6.100.0070.08320.99
5.6.90.0100.06320.97
5.6.80.0030.07320.54
5.5.350.0130.03720.50
5.5.340.0030.04717.96
5.5.330.0130.04320.26
5.5.320.0400.07320.25
5.5.310.0170.04020.38
5.5.300.0030.05717.98
5.5.290.0030.06717.94
5.5.280.0130.08320.69
5.5.270.0070.04020.86
5.5.260.0070.07720.83
5.5.250.0070.04720.67
5.5.240.0100.08720.17
5.4.450.0200.04019.64
5.4.440.0130.06019.30
5.4.430.0200.08019.19
5.4.420.0670.00019.52
5.4.410.0630.00019.45
5.4.400.0630.00019.03
5.4.390.0630.00019.02
5.4.380.0700.06018.61
5.4.370.0500.05018.51
5.4.360.0370.05718.84
5.4.350.0270.05718.57
5.4.340.0230.05318.70
5.4.320.0070.03512.52
5.4.310.0060.03712.50
5.4.300.0070.03512.51
5.4.290.0040.04012.50
5.4.280.0070.03412.41
5.4.270.0050.03712.40
5.4.260.0050.04412.40
5.4.250.0060.03812.40
5.4.240.0060.03812.40
5.4.230.0050.04812.39
5.4.220.0080.03212.39
5.4.210.0030.04412.39
5.4.200.0040.04212.39
5.4.190.0060.03512.39
5.4.180.0060.03912.39
5.4.170.0040.04312.40
5.4.160.0090.03712.39
5.4.150.0060.03812.39
5.4.140.0070.03412.07
5.4.130.0040.03612.07
5.4.120.0080.03612.02
5.4.110.0050.03712.02
5.4.100.0060.03512.02
5.4.90.0070.03412.02
5.4.80.0060.03912.02
5.4.70.0100.03012.01
5.4.60.0060.03412.02
5.4.50.0050.03712.02
5.4.40.0080.03412.01
5.4.30.0030.03912.00
5.4.20.0050.03612.00
5.4.10.0050.03412.00
5.4.00.0070.03311.49
5.3.290.0090.03612.80
5.3.280.0070.03612.71
5.3.270.0050.04012.73
5.3.260.0080.03712.72
5.3.250.0040.03912.72
5.3.240.0040.03912.72
5.3.230.0080.03612.71
5.3.220.0080.03512.68
5.3.210.0050.04012.68
5.3.200.0050.03712.68
5.3.190.0070.03612.68
5.3.180.0040.03812.67
5.3.170.0050.03612.67
5.3.160.0080.03512.67
5.3.150.0030.03912.67
5.3.140.0070.03512.66
5.3.130.0080.03712.65
5.3.120.0080.03812.66
5.3.110.0090.03612.66
5.3.100.0060.03712.13
5.3.90.0070.03712.11
5.3.80.0020.04112.10
5.3.70.0030.03912.10
5.3.60.0090.03312.08
5.3.50.0090.03312.03
5.3.40.0100.03412.03
5.3.30.0050.03712.00
5.3.20.0050.03611.78
5.3.10.0030.03711.73
5.3.00.0060.03511.73
5.2.170.0020.0349.23
5.2.160.0060.0329.23
5.2.150.0040.0319.23
5.2.140.0050.0309.22
5.2.130.0040.0289.19
5.2.120.0040.0309.19
5.2.110.0050.0289.20
5.2.100.0040.0299.19
5.2.90.0080.0319.19
5.2.80.0020.0339.19
5.2.70.0030.0339.19
5.2.60.0060.0299.13
5.2.50.0040.0309.11
5.2.40.0050.0299.08
5.2.30.0030.0329.07
5.2.20.0070.0319.05
5.2.10.0030.0318.96
5.2.00.0090.0318.82
5.1.60.0030.0288.10
5.1.50.0010.0298.09
5.1.40.0050.0278.07
5.1.30.0070.0238.43
5.1.20.0040.0278.45
5.1.10.0050.0328.17
5.1.00.0060.0248.17
5.0.50.0060.0206.66
5.0.40.0030.0206.51
5.0.30.0030.0316.32
5.0.20.0060.0186.29
5.0.10.0030.0206.27
5.0.00.0040.0306.27
4.4.90.0050.0244.78
4.4.80.0040.0134.76
4.4.70.0030.0144.75
4.4.60.0040.0184.75
4.4.50.0010.0174.77
4.4.40.0040.0234.71
4.4.30.0050.0164.76
4.4.20.0030.0184.85
4.4.10.0020.0184.85
4.4.00.0010.0264.76
4.3.110.0060.0194.67
4.3.100.0000.0174.66
4.3.90.0020.0144.63
4.3.80.0020.0284.58
4.3.70.0010.0174.63
4.3.60.0030.0164.63
4.3.50.0050.0144.63
4.3.40.0020.0244.54
4.3.30.0010.0173.30
4.3.20.0030.0173.28
4.3.10.0020.0153.24
4.3.00.0170.0137.84

preferences:
55.2 ms | 401 KiB | 5 Q