3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { private function foo(&$arg1) { var_dump('arg1: ', $arg1); } } class B extends A { public function bar() { $x = new stdClass(); $x->baz = 'just a value'; $this->callPrivate($x); } private function callPrivate($x) { $method = new \ReflectionMethod( 'A', 'foo' ); //* for some reason, the private function needs to have been changed to be 'accessible' for this to work in 5.4 $method->setAccessible(true); //working 5.4 (* see above) but not in 5.5 $arguments = func_get_args(); //not working in either $arguments = array($x); // <---- COMMENT THIS LINE TO SEE IT WORK IN PHP 5.4 return $method->invokeArgs($this, $arguments); } }

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.40.0090.00918.54
8.3.30.0080.00818.96
8.3.20.0080.00020.29
8.3.10.0040.00423.33
8.3.00.0040.00420.95
8.2.170.0110.00422.96
8.2.160.0070.00720.39
8.2.150.0070.00024.18
8.2.140.0000.00824.66
8.2.130.0060.00326.16
8.2.120.0060.00919.23
8.2.110.0030.00622.13
8.2.100.0000.01118.03
8.2.90.0060.00318.92
8.2.80.0000.00817.97
8.2.70.0070.00517.38
8.2.60.0030.00617.80
8.2.50.0000.00818.07
8.2.40.0040.00419.47
8.2.30.0000.00718.17
8.2.20.0040.00417.47
8.2.10.0040.00417.81
8.2.00.0080.00019.23
8.1.270.0040.00423.92
8.1.260.0070.00026.35
8.1.250.0040.00428.09
8.1.240.0040.00422.24
8.1.230.0080.00319.08
8.1.220.0040.00417.74
8.1.210.0000.00818.77
8.1.200.0070.00317.10
8.1.190.0040.00417.10
8.1.180.0060.00318.10
8.1.170.0000.01018.66
8.1.160.0050.00221.94
8.1.150.0040.00418.41
8.1.140.0000.00817.26
8.1.130.0040.00417.78
8.1.120.0100.00017.33
8.1.110.0070.00017.38
8.1.100.0020.00517.35
8.1.90.0040.00417.23
8.1.80.0000.00717.34
8.1.70.0000.00717.23
8.1.60.0000.00817.52
8.1.50.0000.00717.37
8.1.40.0030.00617.38
8.1.30.0050.00317.46
8.1.20.0050.00317.43
8.1.10.0040.00417.35
8.1.00.0000.00817.32
8.0.300.0000.00718.77
8.0.290.0030.00616.63
8.0.280.0000.00718.32
8.0.270.0000.00717.10
8.0.260.0000.00717.05
8.0.250.0070.00016.70
8.0.240.0040.00416.84
8.0.230.0000.00716.68
8.0.220.0040.00416.81
8.0.210.0070.00016.72
8.0.200.0030.00316.78
8.0.190.0000.00816.84
8.0.180.0040.00416.77
8.0.170.0000.00716.83
8.0.160.0050.00216.83
8.0.150.0070.00016.78
8.0.140.0070.00016.74
8.0.130.0030.00313.16
8.0.120.0000.00816.71
8.0.110.0000.00816.84
8.0.100.0040.00416.66
8.0.90.0050.00316.64
8.0.80.0060.01616.82
8.0.70.0070.00016.63
8.0.60.0000.00716.71
8.0.50.0070.00016.66
8.0.30.0110.01016.92
8.0.20.0120.00617.40
8.0.10.0000.00716.88
8.0.00.0080.00916.68
7.4.330.0000.00515.00
7.4.320.0030.00316.39
7.4.300.0060.00016.50
7.4.290.0070.00316.43
7.4.280.0080.00016.42
7.4.270.0000.00716.47
7.4.260.0070.00016.38
7.4.250.0040.00416.42
7.4.240.0000.00716.43
7.4.230.0030.00316.34
7.4.220.0030.02016.52
7.4.210.0050.00816.33
7.4.200.0000.00716.27
7.4.160.0060.01216.50
7.4.150.0100.00917.40
7.4.140.0140.00817.86
7.4.130.0120.00716.43
7.4.120.0060.01016.41
7.4.110.0100.00716.36
7.4.100.0100.00716.23
7.4.90.0030.01316.23
7.4.80.0130.00619.39
7.4.70.0080.01116.44
7.4.60.0100.00616.23
7.4.50.0050.00016.49
7.4.40.0030.01416.41
7.4.30.0080.00716.41
7.4.10.0100.00714.78
7.4.00.0050.01214.99
7.3.330.0000.00513.06
7.3.320.0050.00013.07
7.3.310.0020.00516.07
7.3.300.0040.00416.06
7.3.290.0000.01316.20
7.3.280.0050.01216.21
7.3.270.0150.00317.40
7.3.260.0130.00616.16
7.3.250.0120.00616.27
7.3.240.0060.01016.25
7.3.230.0110.00616.39
7.3.210.0100.00616.24
7.3.200.0130.00619.39
7.3.190.0060.02316.18
7.3.180.0060.00916.30
7.3.170.0130.00716.27
7.3.160.0090.01216.36
7.3.130.0070.01014.90
7.3.120.0030.01014.77
7.3.110.0060.01214.44
7.3.100.0070.00714.62
7.3.90.0040.01114.38
7.3.80.0040.00714.75
7.3.70.0060.00614.51
7.3.60.0000.01314.76
7.3.50.0000.01514.28
7.3.40.0080.00414.61
7.3.30.0080.00514.52
7.3.20.0070.00716.50
7.3.10.0060.00316.53
7.3.00.0060.00916.33
7.2.330.0060.01216.59
7.2.320.0080.01216.30
7.2.310.0070.01416.28
7.2.300.0160.00016.46
7.2.290.0070.01016.23
7.2.260.0070.01014.85
7.2.250.0070.01014.70
7.2.240.0040.00814.84
7.2.230.0040.01114.82
7.2.220.0040.01114.91
7.2.210.0080.00314.96
7.2.200.0070.00714.89
7.2.190.0040.00714.80
7.2.180.0090.00414.63
7.2.170.0060.00914.73
7.2.160.0040.00814.91
7.2.150.0060.00616.41
7.2.140.0000.00916.70
7.2.130.0130.00616.86
7.2.120.0070.00416.85
7.2.110.0030.01316.64
7.2.100.0100.00316.88
7.2.90.0080.00416.45
7.2.80.0030.01016.68
7.2.70.0060.00916.51
7.2.60.0080.00616.54
7.2.50.0050.00816.76
7.2.40.0070.00416.67
7.2.30.0030.01316.79
7.2.20.0080.00816.68
7.2.10.0060.00616.77
7.2.00.0040.01116.60
7.1.330.0000.01215.29
7.1.320.0030.00515.41
7.1.310.0000.01415.53
7.1.300.0040.00715.65
7.1.290.0000.01215.29
7.1.280.0030.00915.65
7.1.270.0070.00715.61
7.1.260.0030.00615.61
7.1.250.0070.01015.70
7.1.240.0030.00715.71
7.1.230.0040.01115.59
7.1.220.0070.00715.52
7.1.210.0070.00715.68
7.1.200.0020.01015.58
7.1.190.0040.01115.72
7.1.180.0090.00015.55
7.1.170.0040.00715.36
7.1.160.0030.00515.70
7.1.150.0120.00315.75
7.1.140.0060.00615.56
7.1.130.0080.00415.36
7.1.120.0090.00315.72
7.1.110.0030.00615.66
7.1.100.0030.00715.64
7.1.90.0000.01215.50
7.1.80.0030.00615.75
7.1.70.0020.00816.09
7.1.60.0090.00917.63
7.1.50.0100.01016.30
7.1.40.0040.00715.57
7.1.30.0070.00715.63
7.1.20.0030.01015.61
7.1.10.0070.00715.37
7.1.00.0110.03618.93
7.0.330.0030.01315.21
7.0.320.0070.00714.97
7.0.310.0000.01115.30
7.0.300.0120.00315.11
7.0.290.0100.00315.00
7.0.280.0070.00714.99
7.0.270.0030.00915.42
7.0.260.0030.00715.21
7.0.250.0040.00415.27
7.0.240.0060.00715.40
7.0.230.0080.00415.41
7.0.220.0040.00415.43
7.0.210.0070.00315.24
7.0.200.0050.00315.78
7.0.190.0080.00015.27
7.0.180.0030.00715.14
7.0.170.0000.01215.42
7.0.160.0000.00815.33
7.0.150.0060.00915.25
7.0.140.0030.04218.64
7.0.130.0040.00815.35
7.0.120.0000.01315.11
7.0.110.0040.01115.16
7.0.100.0060.01917.63
7.0.90.0060.02517.66
7.0.80.0030.02417.65
7.0.70.0000.02317.62
7.0.60.0030.02117.38
7.0.50.0080.02517.71
7.0.40.0100.02016.60
7.0.30.0080.04416.72
7.0.20.0030.02516.60
7.0.10.0020.04516.61
7.0.00.0050.04916.59
5.6.400.0030.01013.90
5.6.390.0030.01014.54
5.6.380.0060.00913.85
5.6.370.0040.00814.49
5.6.360.0040.00814.41
5.6.350.0060.01014.04
5.6.340.0030.01014.02
5.6.330.0040.01114.30
5.6.320.0060.00614.20
5.6.310.0070.00713.96
5.6.300.0070.00714.34
5.6.290.0000.01113.71
5.6.280.0040.04617.43
5.6.270.0030.01014.27
5.6.260.0000.00914.18
5.6.250.0030.02417.54
5.6.240.0060.01717.26
5.6.230.0060.02217.49
5.6.220.0050.02717.29
5.6.210.0120.01717.36
5.6.200.0030.02517.70
5.6.190.0060.02417.57
5.6.180.0030.02417.65
5.6.170.0050.02417.53
5.6.160.0020.02917.53
5.6.150.0050.04317.50
5.6.140.0020.02617.53
5.6.130.0070.03917.46
5.6.120.0080.04317.58
5.6.110.0080.03817.78
5.6.100.0050.04717.52
5.6.90.0070.04217.55
5.6.80.0130.03517.36
5.6.70.0100.04217.19
5.6.60.0100.03817.11
5.6.50.0150.03517.28
5.6.40.0080.04217.19
5.6.30.0090.02517.24
5.6.20.0050.04617.23
5.6.10.0090.02317.39
5.6.00.0050.04717.19
5.5.380.0030.02317.33
5.5.370.0050.02217.27
5.5.360.0020.02417.19
5.5.350.0050.02217.23
5.5.340.0020.02417.47
5.5.330.0000.03217.31
5.5.320.0030.02317.49
5.5.310.0070.03517.37
5.5.300.0080.03517.41
5.5.290.0070.04417.41
5.5.280.0040.03917.56
5.5.270.0050.04117.58
5.5.260.0050.04317.26
5.5.250.0020.04317.26
5.5.240.0070.02717.10
5.5.230.0130.02617.06
5.5.220.0120.04017.11
5.5.210.0090.03817.10
5.5.200.0090.03916.98
5.5.190.0080.04317.11
5.5.180.0080.04717.16
5.5.170.0070.00713.91
5.5.160.0090.03517.15
5.5.150.0030.04717.11
5.5.140.0100.02316.98
5.5.130.0080.02317.05
5.5.120.0060.03616.84
5.5.110.0020.04817.12
5.5.100.0050.03817.13
5.5.90.0050.04517.01
5.5.80.0050.02717.03
5.5.70.0060.02816.82
5.5.60.0020.04217.05
5.5.50.0100.03716.99
5.5.40.0070.03716.96
5.5.30.0070.04517.09
5.5.20.0020.04516.78
5.5.10.0120.04017.07
5.5.00.0060.03317.02
5.4.450.0070.04115.77
5.4.440.0020.04415.59
5.4.430.0030.04115.71
5.4.420.0050.02615.74
5.4.410.0100.03615.69
5.4.400.0080.03915.57
5.4.390.0030.03515.55
5.4.380.0100.03515.58
5.4.370.0030.04315.55
5.4.360.0100.02215.58
5.4.350.0080.03615.41
5.4.340.0020.02915.61
5.4.330.0000.01011.98
5.4.320.0110.04015.55
5.4.310.0050.04215.51
5.4.300.0020.04315.59
5.4.290.0070.03815.53
5.4.280.0070.04315.58
5.4.270.0060.03315.51
5.4.260.0020.03515.55
5.4.250.0070.03215.60
5.4.240.0050.04415.59
5.4.230.0070.03515.57
5.4.220.0050.04015.42
5.4.210.0050.04015.53
5.4.200.0020.03815.56
5.4.190.0030.04015.43
5.4.180.0060.04315.51
5.4.170.0030.04715.41
5.4.160.0080.03715.49
5.4.150.0080.02015.49
5.4.140.0080.02214.23
5.4.130.0100.03514.22
5.4.120.0050.03914.18
5.4.110.0010.04014.20
5.4.100.0070.03914.16
5.4.90.0050.02314.25
5.4.80.0030.04014.18
5.4.70.0050.02514.19
5.4.60.0000.04514.20
5.4.50.0030.03014.11
5.4.40.0010.02414.22
5.4.30.0070.03214.15
5.4.20.0010.02614.21
5.4.10.0100.01714.19
5.4.00.0020.02413.94
5.3.290.0080.03813.39
5.3.280.0010.02513.29
5.3.270.0060.04113.35
5.3.260.0100.03713.31
5.3.250.0050.02213.27
5.3.240.0080.03813.35
5.3.230.0050.02613.28
5.3.220.0050.03013.29
5.3.210.0030.02813.28
5.3.200.0070.03713.25
5.3.190.0070.04013.32
5.3.180.0060.03313.32
5.3.170.0030.04013.30
5.3.160.0030.04213.27
5.3.150.0130.02713.28
5.3.140.0030.03213.32
5.3.130.0070.02313.31
5.3.120.0020.02813.28
5.3.110.0080.03913.25
5.3.100.0070.01813.02
5.3.90.0060.02513.00
5.3.80.0070.02813.05
5.3.70.0020.04312.96
5.3.60.0030.03913.06
5.3.50.0080.03512.96
5.3.40.0080.03812.95
5.3.30.0050.03412.95
5.3.20.0080.03512.80
5.3.10.0060.04112.84
5.3.00.0040.04112.80
5.2.170.0130.05711.20
5.2.160.0070.05711.20
5.2.150.0030.06311.01
5.2.140.0030.06311.20
5.2.130.0100.05711.25
5.2.120.0070.05011.17
5.2.110.0030.03011.21
5.2.100.0130.05711.14
5.2.90.0030.05711.09
5.2.80.0000.04311.16
5.2.70.0030.04311.09
5.2.60.0000.04010.96
5.2.50.0030.05011.08
5.2.40.0000.03711.01
5.2.30.0000.06010.84
5.2.20.0100.05711.06
5.2.10.0100.04710.90
5.2.00.0070.02710.75
5.1.60.0000.06010.07
5.1.50.0000.03010.08
5.1.40.0030.0339.99
5.1.30.0030.05710.34
5.1.20.0030.06010.37
5.1.10.0000.03310.07
5.1.00.0030.05310.15
5.0.50.0070.0308.39
5.0.40.0000.0338.47
5.0.30.0030.0338.34
5.0.20.0000.0438.29
5.0.10.0030.0338.29
5.0.00.0000.0508.29
4.4.90.0000.0208.29
4.4.80.0070.0308.29
4.4.70.0030.0178.29
4.4.60.0030.0238.29
4.4.50.0000.0408.29
4.4.40.0000.0378.29
4.4.30.0000.0278.29
4.4.20.0000.0338.29
4.4.10.0030.0378.29
4.4.00.0030.0278.29
4.3.110.0000.0338.29
4.3.100.0000.0338.29
4.3.90.0030.0338.29
4.3.80.0000.0508.29
4.3.70.0000.0278.29
4.3.60.0070.0308.29
4.3.50.0030.0378.29
4.3.40.0030.0508.29
4.3.30.0030.0278.29
4.3.20.0000.0378.29
4.3.10.0030.0238.29
4.3.00.0000.0178.29

preferences:
81.08 ms | 400 KiB | 5 Q