3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { public function testIsCallable(callable $param) { return is_callable($param); } private function privateMethod() { echo "This is a private method"; } public function test($param) { if ($this->testIsCallable($param)) { $param(); } } } class B extends A { public function testIsCallable(callable $param) { return is_callable($param); } public function test($param) { if ($this->testIsCallable($param)) { $param(); } } } $a = new A(); $b = new B(); $callable = [$a, 'privMethod']; $a->test($callable); $b->test($callable);

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.00318.55
8.3.50.0130.01221.01
8.3.40.0110.00718.79
8.3.30.0170.00018.84
8.3.20.0070.00020.29
8.3.10.0050.00323.70
8.3.00.0000.00722.27
8.2.180.0130.01016.63
8.2.170.0140.00322.96
8.2.160.0070.00720.51
8.2.150.0000.00724.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0030.00617.63
8.2.110.0060.00320.35
8.2.100.0070.00419.64
8.2.90.0090.00017.75
8.2.80.0000.00818.78
8.2.70.0000.00917.50
8.2.60.0000.00817.75
8.2.50.0070.00017.68
8.2.40.0040.00417.63
8.2.30.0000.01018.00
8.2.20.0050.00317.63
8.2.10.0040.00417.94
8.2.00.0000.00818.07
8.1.280.0100.00725.92
8.1.270.0060.01320.32
8.1.260.0090.00026.35
8.1.250.0040.00428.09
8.1.240.0060.00321.87
8.1.230.0080.00417.83
8.1.220.0030.00617.74
8.1.210.0000.00818.77
8.1.200.0060.00317.36
8.1.190.0000.00817.23
8.1.180.0000.01118.10
8.1.170.0060.00317.62
8.1.160.0040.00421.90
8.1.150.0070.00018.89
8.1.140.0060.00317.46
8.1.130.0030.00517.69
8.1.120.0070.00017.37
8.1.110.0000.00917.36
8.1.100.0000.00717.54
8.1.90.0040.00417.45
8.1.80.0060.00317.38
8.1.70.0040.00417.43
8.1.60.0000.00817.61
8.1.50.0060.00317.53
8.1.40.0040.00417.40
8.1.30.0040.00417.71
8.1.20.0050.00217.58
8.1.10.0040.00417.54
8.1.00.0050.00317.40
8.0.300.0030.00318.91
8.0.290.0040.00416.75
8.0.280.0000.00718.47
8.0.270.0030.00317.27
8.0.260.0030.00317.20
8.0.250.0040.00417.07
8.0.240.0060.00316.89
8.0.230.0030.00317.01
8.0.220.0070.00016.91
8.0.210.0030.00316.89
8.0.200.0030.00317.09
8.0.190.0000.00817.05
8.0.180.0040.00416.98
8.0.170.0000.00716.86
8.0.160.0000.00716.96
8.0.150.0040.00416.92
8.0.140.0000.00716.84
8.0.130.0060.00313.38
8.0.120.0030.00516.89
8.0.110.0040.00417.02
8.0.100.0040.00417.01
8.0.90.0020.00516.94
8.0.80.0040.01116.96
8.0.70.0000.00817.06
8.0.60.0040.00417.09
8.0.50.0050.00317.07
8.0.30.0120.00717.06
8.0.20.0130.00617.40
8.0.10.0050.00317.05
8.0.00.0090.01116.88
7.4.330.0000.00615.08
7.4.320.0000.00616.55
7.4.300.0000.00616.51
7.4.290.0100.00016.62
7.4.280.0070.00016.51
7.4.270.0030.00316.62
7.4.260.0000.00816.57
7.4.250.0040.00416.52
7.4.240.0020.00616.49
7.4.230.0070.00016.68
7.4.220.0140.00316.57
7.4.210.0070.01316.47
7.4.200.0000.00816.71
7.4.160.0100.00616.54
7.4.150.0110.00817.40
7.4.140.0150.00417.86
7.4.130.0080.01316.56
7.4.120.0090.00816.50
7.4.110.0120.01216.45
7.4.100.0090.00916.42
7.4.90.0100.00616.45
7.4.80.0120.00919.39
7.4.70.0120.00916.50
7.4.60.0130.00316.55
7.4.50.0080.00016.50
7.4.40.0080.00916.62
7.4.30.0130.01016.39
7.4.10.0120.00315.18
7.4.00.0020.01514.93
7.3.330.0000.00613.20
7.3.320.0030.00313.45
7.3.310.0030.00316.27
7.3.300.0040.00416.37
7.3.290.0050.01216.32
7.3.280.0110.00516.39
7.3.270.0110.00717.40
7.3.260.0080.01216.53
7.3.250.0080.01116.48
7.3.240.0130.00316.46
7.3.230.0140.00316.39
7.3.210.0070.01016.50
7.3.200.0110.00719.39
7.3.190.0130.00316.48
7.3.180.0120.00316.42
7.3.170.0090.00816.34
7.3.160.0120.00816.53
7.3.130.0070.01014.87
7.3.120.0070.01114.70
7.3.110.0050.01114.69
7.3.100.0060.00815.05
7.3.90.0040.00814.74
7.3.80.0090.00514.89
7.3.70.0090.00314.81
7.3.60.0050.01014.74
7.3.50.0030.00514.87
7.3.40.0040.00814.65
7.3.30.0090.00514.73
7.3.20.0110.00316.65
7.3.10.0070.00316.51
7.3.00.0080.00616.66
7.2.330.0060.01616.58
7.2.320.0030.02116.69
7.2.310.0120.00416.46
7.2.300.0090.01216.59
7.2.290.0120.00616.77
7.2.260.0090.00915.09
7.2.250.0060.01114.98
7.2.240.0080.01015.18
7.2.230.0070.00815.14
7.2.220.0000.01614.98
7.2.210.0060.00815.04
7.2.200.0070.00615.14
7.2.190.0020.01115.03
7.2.180.0050.00515.12
7.2.170.0050.01114.94
7.2.160.0070.00715.23
7.2.150.0030.00917.09
7.2.140.0100.00616.84
7.2.130.0080.00516.93
7.2.120.0060.00916.95
7.2.110.0070.00816.97
7.2.100.0100.00716.88
7.2.90.0070.00716.94
7.2.80.0020.01516.79
7.2.70.0040.00916.89
7.2.60.0040.01116.96
7.2.50.0020.01316.95
7.2.40.0070.01016.83
7.2.30.0080.00916.85
7.2.20.0040.01016.79
7.2.10.0070.00516.82
7.2.00.0090.00517.65
7.1.330.0070.00815.92
7.1.320.0070.00715.89
7.1.310.0020.00915.63
7.1.300.0030.00615.75
7.1.290.0070.00715.65
7.1.280.0020.01215.63
7.1.270.0020.00915.77
7.1.260.0030.00915.78
7.1.250.0050.00515.55
7.1.240.0060.00615.62
7.1.230.0030.00915.73
7.1.220.0080.00615.82
7.1.210.0070.00715.79
7.1.200.0050.00715.60
7.1.190.0080.00415.90
7.1.180.0070.00715.91
7.1.170.0040.01115.82
7.1.160.0040.00815.79
7.1.150.0080.00415.73
7.1.140.0070.00715.50
7.1.130.0070.00315.52
7.1.120.0040.00815.84
7.1.110.0090.00315.67
7.1.100.0030.01017.09
7.1.90.0030.00615.93
7.1.80.0030.00815.64
7.1.70.0080.00516.35
7.1.60.0050.01317.78
7.1.50.0060.00916.17
7.1.40.0100.00715.68
7.1.30.0000.01015.77
7.1.20.0040.01215.82
7.1.10.0040.01115.88
7.1.00.0060.03819.08
7.0.330.0060.00815.11
7.0.320.0040.01115.23
7.0.310.0110.00415.07
7.0.300.0040.01115.43
7.0.290.0080.00415.37
7.0.280.0070.00715.44
7.0.270.0080.00615.45
7.0.260.0090.00615.09
7.0.250.0060.00615.25
7.0.240.0040.00715.46
7.0.230.0060.00615.56
7.0.220.0060.00615.15
7.0.210.0030.01315.27
7.0.200.0090.00715.13
7.0.190.0030.00615.38
7.0.180.0060.00615.20
7.0.170.0030.00615.39
7.0.160.0030.01015.30
7.0.150.0040.00815.29
7.0.140.0030.00615.49
7.0.130.0000.01415.45
7.0.120.0000.01615.30
7.0.110.0040.00815.41
7.0.100.0030.00515.11
7.0.90.0110.00415.51
7.0.80.0060.00315.36
7.0.70.0100.00315.24
7.0.60.0170.02217.59
7.0.50.0090.04016.73
7.0.40.0100.04516.69
7.0.30.0120.02316.73
7.0.20.0190.03916.77
7.0.10.0050.03716.84
7.0.00.0090.02516.95
5.6.400.0070.00714.22
5.6.390.0070.00414.44
5.6.380.0040.01114.25
5.6.370.0080.00514.48
5.6.360.0120.00013.95
5.6.350.0000.01414.59
5.6.340.0030.00614.29
5.6.330.0030.00714.25
5.6.320.0070.00714.45
5.6.310.0030.01314.53
5.6.300.0070.00714.27
5.6.290.0000.00914.15
5.6.280.0030.04017.54
5.6.270.0070.01014.21
5.6.260.0030.00914.30
5.6.250.0060.00314.26
5.6.240.0000.01414.41
5.6.230.0110.00314.35
5.6.220.0060.00914.33
5.6.210.0080.03517.43
5.6.200.0000.05016.22
5.6.190.0070.04617.53
5.6.180.0130.02117.38
5.6.170.0080.03817.48
5.6.160.0030.04517.50
5.6.150.0050.02516.16
5.6.140.0020.03516.17
5.6.130.0080.02316.20
5.6.120.0090.04117.66
5.6.110.0080.04117.63
5.6.100.0030.02917.74
5.6.90.0040.02317.60
5.6.80.0120.04217.26
5.6.70.0090.00414.18
5.6.60.0030.00614.22
5.6.50.0000.01514.25
5.6.40.0030.00614.10
5.6.30.0100.00714.16
5.6.20.0060.01213.88
5.6.10.0030.00914.43
5.6.00.0040.01114.25
5.5.380.0040.00814.42
5.5.370.0060.00614.11
5.5.360.0090.00614.13
5.5.350.0130.03817.26
5.5.340.0030.03015.98
5.5.330.0130.04117.22
5.5.320.0150.03517.21
5.5.310.0150.02717.24
5.5.300.0100.01716.01
5.5.290.0090.03015.97
5.5.280.0090.04117.49
5.5.270.0020.03617.34
5.5.260.0100.02117.26
5.5.250.0080.04117.40
5.5.240.0030.02217.04
5.5.230.0100.00014.12
5.5.220.0030.01013.98
5.5.210.0030.01013.80
5.5.200.0080.00014.03
5.5.190.0030.01514.37
5.5.180.0030.01313.83
5.5.170.0030.00514.32
5.5.160.0090.00313.98
5.5.150.0070.00714.11
5.5.140.0000.01414.27
5.5.130.0100.00314.23
5.5.120.0060.00614.40
5.5.110.0070.01014.07
5.5.100.0070.00714.11
5.5.90.0080.00313.94
5.5.80.0000.01414.15
5.5.70.0070.00714.32
5.5.60.0070.01113.94
5.5.50.0080.00514.05
5.5.40.0060.00614.01
5.5.30.0030.00914.02
5.5.20.0060.01014.10
5.5.10.0030.01314.09
5.5.00.0060.00913.84
5.4.450.0430.03515.43
5.4.440.0480.03015.42
5.4.430.0400.02715.21
5.4.420.0400.02915.47
5.4.410.0420.02715.31
5.4.400.0400.02615.28
5.4.390.0430.02815.13
5.4.380.0430.02315.26
5.4.370.0420.02815.31
5.4.360.0460.03115.13
5.4.350.0480.03015.04
5.4.340.0430.03015.27
5.4.330.0030.00611.25
5.4.320.0480.02515.31
5.4.310.0520.03315.27
5.4.300.0380.03115.18
5.4.290.0470.02515.20
5.4.280.0450.03115.04
5.4.270.0450.02915.31
5.4.260.0420.03215.04
5.4.250.0530.02815.25
5.4.240.0480.03115.13
5.4.230.0490.02015.20
5.4.220.0420.03915.11
5.4.210.0430.02915.13
5.4.200.0440.02313.97
5.4.190.0430.02915.19
5.4.180.0420.02815.11
5.4.170.0380.03215.22
5.4.160.0350.03215.12
5.4.150.0380.03015.12
5.4.140.0400.02613.82
5.4.130.0380.03013.80
5.4.120.0430.02513.84
5.4.110.0420.02413.92
5.4.100.0440.02913.93
5.4.90.0370.03313.86
5.4.80.0400.02914.00
5.4.70.0530.03013.77
5.4.60.0030.04013.89
5.4.50.0020.03313.87
5.4.40.0190.03513.84
5.4.30.0200.03013.88
5.4.20.0180.03313.82
5.4.10.0060.00311.25
5.4.00.0060.00611.25

preferences:
80.86 ms | 401 KiB | 5 Q