3v4l.org

run code in 300+ PHP versions simultaneously
<?php // @see https://git.drupalcode.org/project/canvas/-/blob/6b2c5a7dbee665d8de5dce7a462f0616f178d62a/src/PathProcessor/ExperienceBuilderPathProcessor.php function processInbound($path) { if (preg_match('@^/xb/(?!api/)[^/]+/[^/]+@', $path, $matches)) { return $matches[0]; } return $path; } $cases = [ '/xb', '/xb/foo', '/xb/api/something', '/xb/node/42', ]; foreach ($cases as $c) { print sprintf("%s -> %s\n", $c, processInbound($c)); }
Output for git.master, git.master_jit
/xb -> /xb /xb/foo -> /xb/foo /xb/api/something -> /xb/api/something /xb/node/42 -> /xb/node/42

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
48.44 ms | 712 KiB | 4 Q