3v4l.org

run code in 500+ PHP versions simultaneously
<?php $text = 'advcd<img loading="lazy" class="abcd pqr" alt="chi-phi-sinh-o-benh-v"ien-dai-hoc-y-duoc-co-so-2" attr="val"><img loading="lazy" class="abcd pqr" alt="abcd-sinh-o-benh-"ien-dai-hoc-y-duoc-co-so-3">sdfs'; preg_match_all('/(alt)=(".*?"(?=\s*(?:[^\s=]+="|>)))/i', $text, $matches); if (count($matches) > 1) { print_r($matches); }
Output for rfc.property-hooks, git.master, git.master_jit
Array ( [0] => Array ( [0] => alt="chi-phi-sinh-o-benh-v"ien-dai-hoc-y-duoc-co-so-2" [1] => alt="abcd-sinh-o-benh-"ien-dai-hoc-y-duoc-co-so-3" ) [1] => Array ( [0] => alt [1] => alt ) [2] => Array ( [0] => "chi-phi-sinh-o-benh-v"ien-dai-hoc-y-duoc-co-so-2" [1] => "abcd-sinh-o-benh-"ien-dai-hoc-y-duoc-co-so-3" ) )

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:
90.95 ms | 1354 KiB | 4 Q