3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php preg_match_all( '/\[(link)(.*?)!?\](.*?)\[\/\\1\]#i', '[link href="http://www.google.com" title="Google" target="_blank"]Google[/link][link href="http://www.facebook.com"]Facebook[/link] [link href=\'http://www.twitter.com\' rel="nofollow"]Twitter[/link]', $StrMatches ); /* $StrMatches[0] = Full tag string * $StrMatches[1] = Tag name * $StrMatches[2] = tag params string * $StrMatches[3] = Tag content * */ print_r($StrMatches);
based on PLrXB
Output for 7.0.0 - 7.1.0
Warning: preg_match_all(): No ending delimiter '/' found in /in/YVGIQ on line 5
Output for hhvm-3.10.0 - 3.12.0
Warning: No ending delimiter '/' found: [/\[(link)(.*?)!?\](.*?)\[\/\1\]#i] in /in/YVGIQ on line 7
Output for 5.2.0 - 5.6.28
Warning: preg_match_all(): No ending delimiter '/' found in /in/YVGIQ on line 7
Output for 4.3.11 - 5.1.6
Warning: preg_match_all(): No ending delimiter '/' found in /in/YVGIQ on line 7 Array ( )
Output for 4.3.0 - 4.3.10
Warning: No ending delimiter '/' found in /in/YVGIQ on line 7 Array ( )