3v4l.org

run code in 300+ PHP versions simultaneously
<?php class MyClass { public function myMethod($foo) { $reflection = new ReflectionMethod(__CLASS__, __FUNCTION__); $arg_names = []; foreach ($reflection->getParameters() as $parameter) { $arg_names[] = $parameter->name; } if (!in_array('args', $arg_names)) { echo "This is where the deprecation message would be set"; $args = func_get_args(); unset($args[0]); } echo $foo . "\n"; print_r($args); } } class ChildClass extends MyClass { public function myMethod($foo, ...$args) { $reflection = new ReflectionMethod(__CLASS__, __FUNCTION__); $arg_names = []; foreach ($reflection->getParameters() as $parameter) { $arg_names[] = $parameter->name; } if (!in_array('args', $arg_names)) { echo "This is where the deprecation message would be set"; $args = func_get_args(); unset($args[0]); } echo $foo . "\n"; print_r($args); } } $myClass = new MyClass(); $myClass->myMethod("Hi", "here", "are","some", "args"); echo "\n"; $childClass = new ChildClass(); $childClass->myMethod("Hi", "here", "are","some", "args");

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.130.0120.00318.39
8.3.120.0050.00518.93
8.3.110.0090.00916.54
8.3.100.0040.00424.06
8.3.90.0150.00626.77
8.3.80.0060.00318.43
8.3.70.0060.00918.31
8.3.60.0080.00816.88
8.3.50.0100.00718.49
8.3.40.0070.00720.47
8.3.30.0110.00718.58
8.3.20.0080.00024.18
8.3.10.0040.00424.66
8.3.00.0040.00726.16
8.2.250.0040.00416.96
8.2.240.0030.00617.18
8.2.230.0060.00320.94
8.2.220.0030.00737.54
8.2.210.0090.00926.77
8.2.200.0060.00318.41
8.2.190.0140.00416.75
8.2.180.0140.00716.75
8.2.170.0120.00418.84
8.2.160.0070.00722.96
8.2.150.0030.00525.66
8.2.140.0060.00324.66
8.2.130.0170.00026.16
8.2.120.0000.01126.16
8.2.110.0070.01020.38
8.2.100.0040.00817.78
8.2.90.0060.00319.70
8.2.80.0060.00319.23
8.2.70.0060.00317.50
8.2.60.0050.00319.75
8.2.50.0040.00418.07
8.2.40.0030.00520.94
8.2.30.0030.00519.85
8.2.20.0040.00419.32
8.2.10.0040.00418.02
8.2.00.0040.00419.34
8.1.300.0060.00318.09
8.1.290.0060.00330.84
8.1.280.0090.01225.92
8.1.270.0040.00424.66
8.1.260.0000.00726.35
8.1.250.0030.00528.09
8.1.240.0100.00022.45
8.1.230.0120.00020.88
8.1.220.0040.00417.88
8.1.210.0080.00019.07
8.1.200.0030.00617.35
8.1.190.0040.00417.11
8.1.180.0000.00818.10
8.1.170.0030.00518.52
8.1.160.0040.00418.95
8.1.150.0040.00418.70
8.1.140.0040.00417.47
8.1.130.0050.00319.11
8.1.120.0030.00617.53
8.1.110.0000.00817.43
8.1.100.0040.00417.48
8.1.90.0000.00717.43
8.1.80.0040.00417.41
8.1.70.0050.00317.53
8.1.60.0060.00317.46
8.1.50.0000.00717.64
8.1.40.0040.00417.75
8.1.30.0040.00417.64
8.1.20.0080.00017.51
8.1.10.0060.00317.61
8.1.00.0070.00017.52
8.0.300.0070.00020.04
8.0.290.0050.00216.63
8.0.280.0080.00018.47
8.0.270.0040.00417.28
8.0.260.0000.00717.41
8.0.250.0040.00417.41
8.0.240.0000.00817.41
8.0.230.0050.00317.41
8.0.220.0030.00317.41
8.0.210.0030.00517.41
8.0.200.0070.00017.41
8.0.190.0050.00317.41
8.0.180.0040.00417.41
8.0.170.0030.00517.41
8.0.160.0000.00717.41
8.0.150.0080.00017.41
8.0.140.0060.00317.41
8.0.130.0050.00217.41
8.0.120.0040.00417.41
8.0.110.0000.00817.41
8.0.100.0070.00017.41
8.0.90.0000.00717.41
8.0.80.0030.00317.41
8.0.70.0070.00017.41
8.0.60.0040.00417.41
8.0.50.0050.00317.41
8.0.30.0070.00017.41
8.0.20.0000.00717.41
8.0.10.0030.00517.41

preferences:
25.45 ms | 403 KiB | 5 Q