3v4l.org

run code in 300+ PHP versions simultaneously
<?php $Address = "/clanek/12345/komentare"; $Map = array( "/clanky" => "Clanky.php", "/clanek/([^/]*)" => "Blog.php", "/clanek/([^/]*)/komentare" => "Blog.php", "/" => "Main.php" ); foreach ($Map as $Key => $Value) { if (preg_match('~^'.str_replace('~', '\~', $Key).'$~', $Address, $Matches)) { echo "Obsauje: $Key\n"; var_dump($Matches); } }
Output for git.master, git.master_jit, rfc.property-hooks
Obsauje: /clanek/([^/]*)/komentare array(2) { [0]=> string(23) "/clanek/12345/komentare" [1]=> string(5) "12345" }

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:
61.48 ms | 401 KiB | 8 Q