3v4l.org

run code in 300+ PHP versions simultaneously
<?php class PrivacyViolator { private $_caller; function __construct() { $this->_caller = function ($object, $method, $args) { return call_user_func_array(array($object, $method), $args); }; } function callPrivateMethod($object, $method, $args) { $this->_caller = Closure::bind($this->_caller, null, $object); return $this->_caller->__invoke($object, $method, $args); } } class MyClass { private function _hello($args) { var_dump($args); } } $myObject = new MyClass(); $privacyViolator = new PrivacyViolator(); $privacyViolator->callPrivateMethod($myObject, '_hello', array('world'));

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.0140.00718.55
8.3.50.0140.00722.05
8.3.40.0100.00718.68
8.3.30.0100.00719.09
8.3.20.0040.00420.36
8.3.10.0000.00821.68
8.3.00.0000.00922.45
8.2.180.0120.00318.18
8.2.170.0070.00722.96
8.2.160.0140.00022.09
8.2.150.0080.00024.18
8.2.140.0000.00824.66
8.2.130.0040.00426.16
8.2.120.0110.00019.48
8.2.110.0030.00721.01
8.2.100.0040.00817.63
8.2.90.0000.00819.39
8.2.80.0000.01017.97
8.2.70.0040.00417.59
8.2.60.0040.00417.91
8.2.50.0040.00418.07
8.2.40.0000.00821.13
8.2.30.0100.00018.09
8.2.20.0000.00817.64
8.2.10.0040.00418.19
8.2.00.0040.00418.12
8.1.280.0100.00325.92
8.1.270.0050.00320.34
8.1.260.0080.00026.35
8.1.250.0080.00028.09
8.1.240.0090.00020.87
8.1.230.0090.00317.75
8.1.220.0000.00817.76
8.1.210.0080.00018.77
8.1.200.0000.00917.25
8.1.190.0000.00817.35
8.1.180.0000.00918.10
8.1.170.0050.00518.59
8.1.160.0040.00421.95
8.1.150.0000.00818.93
8.1.140.0040.00417.47
8.1.130.0000.00717.72
8.1.120.0070.00017.50
8.1.110.0030.00517.41
8.1.100.0080.00017.47
8.1.90.0000.00717.48
8.1.80.0050.00517.44
8.1.70.0030.00317.45
8.1.60.0040.00417.49
8.1.50.0070.00017.46
8.1.40.0030.00517.53
8.1.30.0000.00817.55
8.1.20.0050.00217.55
8.1.10.0000.00817.49
8.1.00.0040.00417.58
8.0.300.0040.00418.77
8.0.290.0040.00416.63
8.0.280.0000.00718.47
8.0.270.0080.00017.18
8.0.260.0030.00317.27
8.0.250.0030.00316.92
8.0.240.0000.00716.87
8.0.230.0000.00816.83
8.0.220.0000.00716.91
8.0.210.0060.00316.93
8.0.200.0030.00316.84
8.0.190.0080.00016.91
8.0.180.0000.00716.88
8.0.170.0040.00416.99
8.0.160.0040.00416.81
8.0.150.0040.00416.89
8.0.140.0040.00416.82
8.0.130.0060.00013.30
8.0.120.0080.00016.88
8.0.110.0000.00716.89
8.0.100.0040.00416.79
8.0.90.0030.00516.92
8.0.80.0090.00616.87
8.0.70.0030.00516.92
8.0.60.0040.00416.96
8.0.50.0030.00516.88
8.0.30.0080.01017.11
8.0.20.0100.01317.40
8.0.10.0000.00816.96
8.0.00.0110.00616.88
7.4.330.0030.00315.14
7.4.320.0000.00716.61
7.4.300.0030.00316.55
7.4.290.0040.00716.48
7.4.280.0060.00316.61
7.4.270.0070.00016.52
7.4.260.0000.00716.54
7.4.250.0000.00716.50
7.4.240.0000.00716.52
7.4.230.0070.00016.37
7.4.220.0090.00916.71
7.4.210.0080.01016.57
7.4.200.0040.00416.53
7.4.160.0030.01916.45
7.4.150.0100.01717.40
7.4.140.0100.01117.86
7.4.130.0130.00816.54
7.4.120.0090.00916.43
7.4.110.0060.01216.40
7.4.100.0140.00416.45
7.4.90.0100.01616.71
7.4.80.0100.00719.39
7.4.70.0150.00816.75
7.4.60.0120.00316.43
7.4.50.0030.00616.45
7.4.40.0090.00916.73
7.4.30.0160.00016.32
7.4.00.0070.01015.14
7.3.330.0030.00313.18
7.3.320.0050.00013.29
7.3.310.0080.00016.38
7.3.300.0070.00016.21
7.3.290.0080.00916.28
7.3.280.0080.00916.32
7.3.270.0160.01017.40
7.3.260.0080.00816.32
7.3.250.0120.00516.39
7.3.240.0040.01216.61
7.3.230.0070.01016.42
7.3.210.0140.00416.45
7.3.200.0030.01416.72
7.3.190.0130.00916.32
7.3.180.0070.01016.25
7.3.170.0130.00416.43
7.3.160.0100.00716.43
7.2.330.0100.00716.51
7.2.320.0130.00416.68
7.2.310.0000.01616.52
7.2.300.0140.01016.69
7.2.290.0080.00816.58
7.2.60.0040.01116.98
7.1.200.0030.00915.70
7.1.70.0000.00917.17
7.1.60.0090.01619.40
7.1.50.0100.01416.71
7.1.00.0130.06722.30
7.0.200.0030.00316.73
7.0.60.0070.07721.71
7.0.50.0030.04317.89
7.0.40.0070.04020.25
7.0.30.0270.07320.06
7.0.20.0330.07320.22
7.0.10.0130.05320.24
7.0.00.0070.08320.10
5.6.280.0030.04021.00
5.6.210.0100.08020.78
5.6.200.0000.04718.29
5.6.190.0070.04020.46
5.6.180.0130.04720.48
5.6.170.0330.07720.50
5.6.160.0070.08320.48
5.6.150.0000.08718.18
5.6.140.0070.07018.13
5.6.130.0200.05718.17
5.6.120.0130.08021.01
5.6.110.0030.06721.00
5.6.100.0100.07020.98
5.6.90.0100.08021.13
5.6.80.0100.07720.41
5.5.350.0270.07020.45
5.5.340.0030.06017.99
5.5.330.0100.06720.31
5.5.320.0270.07020.38
5.5.310.0370.06320.28
5.5.300.0230.03018.08
5.5.290.0100.04318.02
5.5.280.0070.07320.88
5.5.270.0200.07020.73
5.5.260.0100.08320.85
5.5.250.0100.08020.78
5.5.240.0200.03020.14
5.4.450.0770.06719.61
5.4.440.0630.06019.29
5.4.430.0630.06719.44
5.4.420.0730.06319.68
5.4.410.0630.05319.20
5.4.400.0700.04719.01
5.4.390.0700.04719.36
5.4.380.0700.04319.22
5.4.370.0570.05719.29
5.4.360.0630.05318.96
5.4.350.1030.04719.26
5.4.340.0700.04719.23
5.4.320.0670.05019.28
5.4.310.0630.05319.14
5.4.300.0670.05318.95
5.4.290.0730.04319.27
5.4.280.0870.06719.28
5.4.270.0530.05719.28
5.4.260.0670.04319.27
5.4.250.0630.06319.30
5.4.240.0800.04719.27
5.4.230.0770.05019.29
5.4.220.0230.05319.29
5.4.210.0100.05019.11
5.4.200.0070.05316.70
5.4.190.0330.04319.06
5.4.180.0630.05719.14
5.4.170.0770.04018.91
5.4.160.0670.05318.90
5.4.150.0830.05018.98
5.4.140.0530.05716.35
5.4.130.0700.05316.34
5.4.120.0670.05316.60
5.4.110.0800.04716.53
5.4.100.0730.05316.47
5.4.90.0730.05016.54
5.4.80.0770.05316.59
5.4.70.0830.04016.42
5.4.60.0730.05016.42
5.4.50.0830.05316.29
5.4.40.0670.05716.48
5.4.30.0730.05316.35
5.4.20.0800.04716.34
5.4.10.0800.04316.50
5.4.00.0800.05315.98
5.3.290.0730.05714.68
5.3.280.0700.05314.51
5.3.270.0830.05314.86
5.3.260.0730.05714.49
5.3.250.0700.05714.53
5.3.240.0770.05014.77
5.3.230.0770.05014.61
5.3.220.0730.05314.44
5.3.210.0730.05314.58
5.3.200.0830.06014.55
5.3.190.0900.04014.49
5.3.180.0700.04314.59
5.3.170.0900.06714.48
5.3.160.0870.04314.59
5.3.150.0800.05014.63
5.3.140.0770.05014.54
5.3.130.0800.05314.48
5.3.120.1070.06014.71
5.3.110.0800.04714.61
5.3.100.0800.04713.96
5.3.90.0700.05314.02
5.3.80.0700.05713.95
5.3.70.0770.05014.05
5.3.60.0700.04713.92
5.3.50.0900.04013.89
5.3.40.0800.04314.05
5.3.30.0770.05313.99
5.3.20.0930.05313.73
5.3.10.0870.04013.58
5.3.00.0800.05013.66
5.2.170.0470.04311.15
5.2.160.0530.03711.20
5.2.150.0700.04311.21
5.2.140.0570.04311.04
5.2.130.0600.04311.11
5.2.120.0630.03711.25
5.2.110.0630.03711.02
5.2.100.0730.04011.02
5.2.90.0670.03711.25
5.2.80.0670.03711.11
5.2.70.0430.04711.02
5.2.60.0670.04011.11
5.2.50.0600.04711.10
5.2.40.0600.05010.90
5.2.30.0670.04311.20
5.2.20.0470.04010.82
5.2.10.0570.04310.78
5.2.00.0430.03710.62
5.1.60.0530.03010.05
5.1.50.0500.0339.84
5.1.40.0500.0339.82
5.1.30.0570.03010.20
5.1.20.0470.04010.21
5.1.10.0700.02310.13
5.1.00.0400.04010.05
5.0.50.0030.0308.63
5.0.40.0030.0278.40
5.0.30.0000.0478.15
5.0.20.0070.0338.22
5.0.10.0030.0278.07
5.0.00.0070.0408.00
4.4.90.0100.0205.83
4.4.80.0070.0175.84
4.4.70.0030.0205.82
4.4.60.0000.0235.84
4.4.50.0270.0205.86
4.4.40.0230.0375.84
4.4.30.0300.0205.79
4.4.20.0230.0235.88
4.4.10.0270.0235.91
4.4.00.0230.0305.82
4.3.110.0130.0275.76
4.3.100.0230.0175.77
4.3.90.0270.0235.75
4.3.80.0270.0405.64
4.3.70.0270.0135.67
4.3.60.0230.0175.74
4.3.50.0170.0235.66
4.3.40.0170.0375.74
4.3.30.0100.0234.43
4.3.20.0130.0204.50
4.3.10.0100.0234.48
4.3.00.0100.0236.40

preferences:
54.83 ms | 401 KiB | 5 Q