3v4l.org

run code in 300+ PHP versions simultaneously
<?php $urls = '<option value="http://foo.bar" selected="selected">value</option> <option value="http://bar.foo">test</option>'; $matches = array(); preg_match_all('/<option\svalue="([^"]*)"(?:\s+selected="(selected)")?>([^>]*)<\/option>/', $urls, $matches); var_dump($matches);
Output for git.master, git.master_jit, rfc.property-hooks
array(4) { [0]=> array(2) { [0]=> string(65) "<option value="http://foo.bar" selected="selected">value</option>" [1]=> string(44) "<option value="http://bar.foo">test</option>" } [1]=> array(2) { [0]=> string(14) "http://foo.bar" [1]=> string(14) "http://bar.foo" } [2]=> array(2) { [0]=> string(8) "selected" [1]=> string(0) "" } [3]=> array(2) { [0]=> string(5) "value" [1]=> string(4) "test" } }

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:
63.24 ms | 402 KiB | 8 Q