3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface RequestInterface{} class Request implements RequestInterface {} interface Promise{} class PromiseImpl implements Promise {} interface Plugin { public function handleRequest(RequestInterface $request, callable $next, callable $first); } trait ForwardCompatibilityPlugin { abstract function doHandleRequest(RequestInterface $request, callable $next, callable $first); public function handleRequest(RequestInterface $request, callable $next, callable $first) { return $this->doHandleRequest($request, $next, $first); } } class MyPlugin implements Plugin { use ForwardCompatibilityPlugin; /** * {@inheritdoc} */ protected function doHandleRequest(RequestInterface $request, callable $next, callable $first) { echo "foobar\n"; return $next($request); } } $request = new Request(); $callable = function() { echo "callable\n"; return new PromiseImpl(); }; $plugin = new MyPlugin(); $plugin->handleRequest($request, $callable, $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.5.10.0100.00916.86
8.5.00.0130.00920.00
8.4.150.0020.00014.05
8.4.140.0100.01117.61
8.4.130.0090.00917.48
8.4.120.0090.01122.26
8.4.110.0120.00818.81
8.4.100.0090.01217.80
8.4.90.0030.00617.65
8.4.80.0120.00919.58
8.4.70.0100.01017.70
8.4.60.0030.00618.83
8.4.50.0110.01018.50
8.4.40.0040.01619.47
8.4.30.0040.00418.62
8.4.20.0030.00718.71
8.4.10.0130.00317.32
8.3.280.0010.00114.05
8.3.270.0110.01216.50
8.3.260.0050.00416.46
8.3.250.0090.00920.63
8.3.240.0130.00716.41
8.3.230.0120.00716.67
8.3.220.0110.00816.73
8.3.210.0110.00816.50
8.3.200.0070.00316.63
8.3.190.0100.01017.31
8.3.180.0120.00318.38
8.3.170.0070.01117.11
8.3.160.0130.00718.16
8.3.150.0130.00718.26
8.3.140.0110.00017.05
8.3.130.0030.00716.53
8.3.120.0000.00818.84
8.3.110.0030.00620.94
8.3.100.0080.00024.06
8.3.90.0030.00526.77
8.3.80.0030.00618.31
8.3.70.0110.00416.38
8.3.60.0150.00318.48
8.3.50.0100.00317.29
8.3.40.0080.00818.70
8.3.30.0080.00818.71
8.3.20.0020.00520.73
8.3.10.0000.00823.65
8.3.00.0040.00423.57
8.2.290.0080.01119.01
8.2.280.0120.00618.29
8.2.270.0060.00617.34
8.2.260.0070.00716.54
8.2.250.0050.00316.84
8.2.240.0030.00618.95
8.2.230.0080.00022.58
8.2.220.0040.00437.54
8.2.210.0080.00026.77
8.2.200.0000.00918.54
8.2.190.0100.00620.04
8.2.180.0120.00318.29
8.2.170.0110.00422.96
8.2.160.0000.01421.95
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0000.00819.95
8.2.120.0070.00026.35
8.2.110.0090.00021.19
8.2.100.0060.00617.78
8.2.90.0090.00017.75
8.2.80.0000.00817.97
8.2.70.0000.00817.93
8.2.60.0040.00418.03
8.2.50.0080.00018.10
8.2.40.0000.00719.34
8.2.30.0000.00719.27
8.2.20.0040.00418.07
8.2.10.0060.00319.27
8.2.00.0070.00019.34
8.1.330.0110.00516.24
8.1.320.0110.00416.14
8.1.310.0060.00318.53
8.1.300.0060.01219.35
8.1.290.0030.00630.84
8.1.280.0080.00825.92
8.1.270.0050.00318.95
8.1.260.0070.00026.35
8.1.250.0040.00428.09
8.1.240.0070.01324.02
8.1.230.0100.00020.39
8.1.220.0030.00617.79
8.1.210.0040.00418.77
8.1.200.0000.00917.35
8.1.190.0030.00617.23
8.1.180.0050.00318.10
8.1.170.0080.00018.53
8.1.160.0040.00418.91
8.1.150.0000.00818.91
8.1.140.0040.00422.17
8.1.130.0000.00720.20
8.1.120.0000.00717.53
8.1.110.0040.00417.41
8.1.100.0070.00017.37
8.1.90.0000.00817.43
8.1.80.0040.00417.51
8.1.70.0000.00717.48
8.1.60.0050.00317.61
8.1.50.0050.00217.42
8.1.40.0090.00017.37
8.1.30.0040.00417.50
8.1.20.0000.00817.63
8.1.10.0030.00517.55
8.1.00.0080.00017.48
8.0.300.0060.00319.63
8.0.290.0050.00216.75
8.0.280.0070.00018.47
8.0.270.0030.00317.32
8.0.260.0060.00018.38
8.0.250.0080.00017.01
8.0.240.0060.00316.93
8.0.230.0000.00717.07
8.0.220.0000.00717.01
8.0.210.0030.00316.94
8.0.200.0000.00817.07
8.0.190.0000.00716.93
8.0.180.0000.00816.98
8.0.170.0050.00316.91
8.0.160.0050.00316.86
8.0.150.0000.00816.86
8.0.140.0040.00416.96
8.0.130.0000.00513.41
8.0.120.0050.00316.86
8.0.110.0050.00316.89
8.0.100.0000.00816.75
8.0.90.0000.00716.85
8.0.80.0070.01016.97
8.0.70.0050.00217.00
8.0.60.0050.00216.82
8.0.50.0030.00516.86
8.0.30.0070.01117.16
8.0.20.0070.01317.02
8.0.10.0040.00416.95
8.0.00.0110.01316.79
7.4.330.0000.00615.55
7.4.320.0040.00416.53
7.4.300.0030.00316.61
7.4.290.0000.00716.58
7.4.280.0040.00416.52
7.4.270.0000.00816.48
7.4.260.0080.00016.53
7.4.250.0040.00416.56
7.4.240.0080.00016.62
7.4.230.0090.00016.66
7.4.220.0070.00016.61
7.4.210.0030.01416.56
7.4.200.0070.00016.63
7.4.160.0080.00916.45
7.4.140.0080.01117.86
7.4.130.0040.02016.64
7.4.120.0100.00716.69
7.4.110.0110.00716.41
7.4.100.0080.01116.38
7.4.90.0170.00016.63
7.4.80.0050.01119.39
7.4.70.0090.00616.50
7.4.60.0100.00716.41
7.4.50.0140.00316.59
7.4.40.0120.01216.47
7.4.00.0090.00614.94
7.3.330.0020.00213.18
7.3.320.0030.00313.24
7.3.310.0030.00316.37
7.3.300.0000.00716.24
7.3.290.0020.00516.19
7.3.280.0060.01116.29
7.3.260.0100.01016.46
7.3.240.0100.01016.45
7.3.230.0030.01316.56
7.3.210.0130.00316.57
7.3.200.0030.01416.26
7.3.190.0110.00616.50
7.3.180.0070.01016.65
7.3.170.0110.01116.24
7.3.160.0070.01316.22
7.3.10.0090.00316.86
7.3.00.0230.00715.34
7.2.330.0090.00916.64
7.2.320.0110.00716.74
7.2.310.0070.01416.89
7.2.300.0100.00716.34
7.2.290.0160.00716.80
7.2.130.0250.00515.71
7.2.120.0190.00416.02
7.2.110.0230.00915.62
7.2.100.0240.00415.78
7.2.90.0150.01215.92
7.2.80.0130.00915.83
7.2.70.0230.00815.90
7.2.60.0200.00815.93
7.2.50.0200.00615.60
7.2.40.0180.00515.89
7.2.30.0120.01015.90
7.2.20.0180.00715.92
7.2.10.0290.00815.96
7.2.00.0280.00515.86
7.1.250.0240.00514.58
7.0.330.0420.00313.43
5.6.380.0060.00614.00

preferences:
53.38 ms | 403 KiB | 5 Q