3v4l.org

run code in 500+ PHP versions simultaneously
<?php $path = "item/image/365141.jpg"; preg_match( '/^\/*(?:(item|swatch)\/+)?(?:([\w|\-]+)\/+)?([\w|\-]+)(?:\.([a-z|A-Z]{3,4}))?$/', $path, $matches); print_r($matches);
Output for master
Array ( [0] => item/image/365141.jpg [1] => item [2] => image [3] => 365141 [4] => jpg )

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:
13.91 ms | 1164 KiB | 7 Q