3v4l.org

run code in 500+ PHP versions simultaneously
<?php $re = '/<a ?.*?>([^<]+)<\/a>/m'; $str = '<li><a href="/somelink1">name1</a></li><li><a href="/somelink2">name2</a></li><li><a href="/somelink3">name3</a></li>'; $result = []; preg_match_all($re, $str, $matches, PREG_SET_ORDER, 0); // Print the entire match result foreach($matches as $match){ $result[] = $match[1]; } print '<pre>'; print_r($result);
Output for rfc.property-hooks, git.master, git.master_jit
<pre>Array ( [0] => name1 [1] => name2 [2] => name3 )

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:
46.87 ms | 2754 KiB | 4 Q