3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { private $bar; private $baz; protected function getBar() { return __METHOD__; } private function getBaz() { return __METHOD__; } public function __call($methodName, $args) { if (!method_exists($this, $methodName)) { return 'some wise behavior'; } return 'Magic! '.$this->$methodName(...$args); } } $foo = new Foo(); var_dump(method_exists($foo, '__call')); var_dump(method_exists($foo, 'bar')); var_dump(method_exists($foo, 'baz')); var_dump($foo->__call('baz', [])); var_dump($foo->baz()); var_dump($foo->__call('nonexistent', []));

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.4.130.0080.01018.69
8.4.120.0080.01024.09
8.4.110.0100.00919.00
8.4.100.0110.00918.92
8.4.90.0070.01222.26
8.4.80.0110.00920.50
8.4.70.0110.00917.93
8.4.60.0120.00918.70
8.4.50.0120.00818.61
8.4.40.0170.00317.68
8.4.30.0200.00017.48
8.4.20.0030.01620.39
8.4.10.0030.00619.39
8.3.260.0110.00916.72
8.3.250.0070.01218.74
8.3.240.0140.00617.30
8.3.230.0100.00916.48
8.3.220.0070.00819.10
8.3.210.0110.00816.57
8.3.200.0030.00516.64
8.3.190.0060.00217.17
8.3.180.0120.00517.07
8.3.170.0060.01320.84
8.3.160.0090.00917.29
8.3.150.0120.00616.50
8.3.140.0060.00317.36
8.3.130.0070.00718.56
8.3.120.0060.00320.79
8.3.110.0090.00020.94
8.3.100.0000.00824.06
8.3.90.0180.00026.77
8.3.80.0090.00017.97
8.3.70.0140.00718.36
8.3.60.0060.01216.50
8.3.50.0110.00718.24
8.3.40.0090.00918.80
8.3.30.0040.01118.67
8.3.20.0080.00021.85
8.3.10.0000.00820.34
8.3.00.0030.00517.38
8.2.290.0090.00220.38
8.2.280.0120.00718.34
8.2.270.0140.00316.78
8.2.260.0100.00716.48
8.2.250.0110.00418.57
8.2.240.0060.00318.99
8.2.230.0000.00822.58
8.2.220.0080.00037.54
8.2.210.0000.00826.77
8.2.200.0050.00518.29
8.2.190.0040.01216.59
8.2.180.0120.00916.38
8.2.170.0040.01122.96
8.2.160.0170.00022.08
8.2.150.0040.00424.18
8.2.140.0030.00524.66
8.2.130.0080.00026.16
8.2.120.0040.00421.11
8.2.110.0060.00322.11
8.2.100.0120.00017.72
8.2.90.0050.00317.63
8.2.80.0030.00518.04
8.2.70.0090.00017.88
8.2.60.0090.00018.16
8.2.50.0060.00318.10
8.2.40.0040.00419.30
8.2.30.0040.00419.24
8.2.20.0040.00417.95
8.2.10.0040.00419.33
8.2.00.0000.00718.01
8.1.330.0100.01122.07
8.1.320.0090.00918.37
8.1.310.0080.00016.34
8.1.300.0000.00920.19
8.1.290.0060.00330.84
8.1.280.0040.01225.92
8.1.270.0080.00018.87
8.1.260.0040.00426.35
8.1.250.0000.00828.09
8.1.240.0110.00417.44
8.1.230.0090.00322.68
8.1.220.0040.00417.74
8.1.210.0060.00318.77
8.1.200.0000.01117.23
8.1.190.0070.00317.23
8.1.180.0050.00318.10
8.1.170.0040.00718.65
8.1.160.0070.00018.93
8.1.150.0000.00718.89
8.1.140.0000.00718.86
8.1.130.0100.00020.10
8.1.120.0050.00317.47
8.1.110.0000.00817.45
8.1.100.0060.00317.41
8.1.90.0000.00817.50
8.1.80.0040.00417.50
8.1.70.0000.00717.47
8.1.60.0040.00417.54
8.1.50.0000.00817.53
8.1.40.0040.00417.39
8.1.30.0040.00417.62
8.1.20.0030.00617.63
8.1.10.0040.00417.38
8.1.00.0070.00017.43
8.0.300.0040.00419.73
8.0.290.0000.00816.75
8.0.280.0070.00018.45
8.0.270.0040.00417.14
8.0.260.0030.00318.40
8.0.250.0000.00716.96
8.0.240.0030.00616.96
8.0.230.0030.00316.84
8.0.220.0040.00416.87
8.0.210.0070.00016.77
8.0.200.0030.00316.98
8.0.190.0070.00016.95
8.0.180.0080.00016.84
8.0.170.0090.00016.81
8.0.160.0000.00816.95
8.0.150.0040.00416.84
8.0.140.0000.00716.89
8.0.130.0000.00613.41
8.0.120.0000.00816.72
8.0.110.0020.00516.90
8.0.100.0050.00316.93
8.0.90.0000.00716.70
8.0.80.0050.01216.92
8.0.70.0050.00216.83
8.0.60.0000.00716.80
8.0.50.0040.00416.96
8.0.30.0140.00516.87
8.0.20.0090.00917.14
8.0.10.0040.00416.88
8.0.00.0160.00616.74
7.4.330.0000.00515.55
7.4.320.0000.00616.60
7.4.300.0060.00016.60
7.4.290.0050.00316.58
7.4.280.0000.00716.63
7.4.270.0070.00016.62
7.4.260.0030.00316.64
7.4.250.0000.00716.47
7.4.240.0000.00716.64
7.4.230.0030.00316.50
7.4.220.0030.00516.48
7.4.210.0090.00616.61
7.4.200.0030.00316.68
7.4.160.0100.00816.53
7.4.140.0120.00717.86
7.4.130.0090.00916.39
7.4.120.0070.01116.60
7.4.110.0110.00916.47
7.4.100.0120.01216.68
7.4.90.0100.01316.38
7.4.80.0110.00719.39
7.4.70.0080.00816.45
7.4.60.0100.00616.58
7.4.50.0070.01016.60
7.4.40.0070.01016.60
7.4.10.0110.00715.14
7.4.00.0070.00815.08
7.3.330.0020.00213.23
7.3.320.0060.00013.19
7.3.310.0000.00716.09
7.3.300.0030.00316.20
7.3.290.0040.00416.20
7.3.280.0130.00716.22
7.3.260.0080.01016.42
7.3.240.0100.00916.36
7.3.230.0060.01116.39
7.3.210.0030.01316.13
7.3.200.0080.00816.20
7.3.190.0100.00716.49
7.3.180.0110.00516.25
7.3.170.0060.01016.38
7.3.160.0140.00416.56
7.3.130.0030.01514.68
7.3.120.0130.00714.99
7.3.110.0060.00914.70
7.3.100.0040.00814.52
7.3.90.0060.00614.64
7.3.80.0080.00414.68
7.3.70.0080.00814.85
7.3.60.0080.00314.76
7.3.50.0070.00414.42
7.3.40.0000.01114.46
7.3.30.0100.00614.73
7.3.20.0000.01516.63
7.3.10.0280.00715.66
7.3.00.0280.00615.44
7.2.330.0170.00016.66
7.2.320.0100.01316.62
7.2.310.0080.00816.57
7.2.300.0090.00816.81
7.2.290.0100.00616.37
7.2.260.0110.00715.03
7.2.250.0090.00914.95
7.2.240.0090.00415.08
7.2.230.0070.00715.15
7.2.220.0030.01515.11
7.2.210.0060.00614.95
7.2.200.0030.00615.16
7.2.190.0000.01215.15
7.2.180.0090.00314.98
7.2.170.0100.00715.02
7.2.160.0100.00315.03
7.2.150.0080.00616.48
7.2.140.0070.00416.47
7.2.130.0200.01015.80
7.2.120.0220.00815.95
7.2.110.0340.00515.81
7.2.100.0220.00515.80
7.2.90.0190.00615.86
7.2.80.0300.00316.07
7.2.70.0230.00616.02
7.2.60.0250.00915.80
7.2.50.0270.00715.90
7.2.40.0230.00915.99
7.2.30.0260.01216.03
7.2.20.0270.00615.70
7.2.10.0240.00415.95
7.2.00.0220.01115.82
7.1.330.0030.00515.89
7.1.320.0090.00915.59
7.1.310.0100.00315.53
7.1.300.0030.00915.76
7.1.290.0060.00615.64
7.1.280.0100.00315.50
7.1.270.0100.00315.77
7.1.260.0070.00315.91
7.1.250.0280.00614.87
7.1.240.0060.00615.69
7.1.230.0060.00815.53
7.1.220.0070.00715.84
7.1.210.0040.00715.85
7.1.200.0090.00615.80
7.1.190.0100.00315.79
7.1.180.0000.01115.89
7.1.170.0030.00915.80
7.1.160.0040.01115.93
7.1.150.0030.01015.73
7.1.140.0100.00015.50
7.1.130.0060.00315.60
7.1.120.0070.00315.77
7.1.110.0100.00715.86
7.1.100.0060.00615.95
7.1.90.0000.01215.73
7.1.80.0000.01415.73
7.1.70.0030.00615.81
7.1.60.0000.01115.56
7.1.50.0040.00815.83
7.1.40.0100.00315.70
7.1.30.0060.00615.40
7.1.20.0000.01515.86
7.1.10.0060.00715.49
7.1.00.0000.01715.74

preferences:
27.64 ms | 403 KiB | 5 Q