3v4l.org

run code in 300+ PHP versions simultaneously
<?php // @see https://git.drupalcode.org/project/canvas/-/blob/c5fd26f0999496f5f1b1d88e06e522a44d3fc85b/src/PathProcessor/CanvasPathProcessor.php function processInbound($path) { // Only rewrite if not /canvas/api and starts with /canvas/ if (str_starts_with($path, '/canvas/') && !str_starts_with($path, '/canvas/api')) { return '/canvas'; } return $path; } $cases = [ '/canvas', '/canvas/foo', '/canvas/api/something', '/canvas/node/42', ]; foreach ($cases as $c) { print sprintf("%s -> %s\n", $c, processInbound($c)); }

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.30.0100.00819.46
8.5.20.0110.01020.20
8.5.10.0410.00516.36
8.5.00.0250.00816.69
8.4.180.0130.00919.50
8.4.170.0290.01619.48
8.4.160.0300.01420.29
8.4.150.0320.01219.50
8.4.140.0320.01517.31
8.4.130.0350.01217.45
8.4.120.0380.01417.67
8.4.110.0390.01117.46
8.4.100.0460.00817.52
8.4.90.0440.00617.78
8.4.80.0390.01117.57
8.4.70.0430.01017.62
8.4.60.0460.00617.63
8.4.50.0390.01217.57
8.4.40.0450.00917.23
8.4.30.0440.01117.55
8.4.20.0340.01417.62
8.4.10.0460.01217.51
8.3.300.0270.00617.99
8.3.290.0260.00618.06
8.3.280.0240.01117.92
8.3.270.0310.00616.43
8.3.260.0350.00716.72
8.3.250.0360.00816.43
8.3.240.0410.00916.56
8.3.230.0440.00916.41
8.3.220.0390.01316.30
8.3.210.0490.00916.64
8.3.200.0370.00716.46
8.3.190.0300.00816.37
8.3.180.0290.00816.48
8.3.170.0310.00816.40
8.3.160.0370.00716.69
8.3.150.0320.00816.52
8.3.140.0350.00916.46
8.3.130.0350.00716.45
8.3.120.0290.00916.33
8.3.110.0370.00916.42
8.3.100.0420.00716.64
8.3.90.0370.01216.51
8.3.80.0430.00816.47
8.3.70.0370.01116.48
8.3.60.0360.00916.37
8.3.50.0390.00718.09
8.3.40.0360.00817.80
8.3.30.0300.01317.67
8.3.20.0260.01219.48
8.3.10.0250.01117.73
8.3.00.0130.01219.33

preferences:
56.6 ms | 713 KiB | 5 Q