3v4l.org

run code in 500+ PHP versions simultaneously
<?php $s = "i want to show you my youtube channel : [youtube id=12341234] and my instagram account : [instagram id=myingaccount213]"; preg_match_all("~\h*(.*?\[[^][]*])~", $s, $matches); print_r($matches[1]);

preferences:
21.25 ms | 475 KiB | 4 Q