3v4l.org

run code in 300+ PHP versions simultaneously
<?php $bigKml = "<br><img src='files/bagel.png'><br><br>"; $pattern = "/<img src=.*?>/"; preg_match($pattern, $bigKml, $imageTags); print_r($imageTags); foreach($imageTags as $imageTag) { $pattern = "/'([^']*)'/"; preg_match($urlPattern, $imageTag, $oldUrls); $oldUrl = $oldUrls[0]; print_r($oldUrl); } ?>
Output for git.master, git.master_jit
Array ( [0] => <img src='files/bagel.png'> ) Warning: Undefined variable $urlPattern in /in/8RW6V on line 8 Deprecated: preg_match(): Passing null to parameter #1 ($pattern) of type string is deprecated in /in/8RW6V on line 8 Warning: preg_match(): Empty regular expression in /in/8RW6V on line 8 Warning: Trying to access array offset on value of type null in /in/8RW6V on line 9
Output for rfc.property-hooks
Array ( [0] => <img src='files/bagel.png'> ) Warning: Undefined variable $urlPattern in /in/8RW6V on line 8 Deprecated: preg_match(): Passing null to parameter #1 ($pattern) of type string is deprecated in /in/8RW6V on line 8 Warning: preg_match(): Empty regular expression in /in/8RW6V on line 8 Warning: Trying to access array offset on null in /in/8RW6V on line 9

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