3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = 'this is some sample'; $base = 'shortcode'; $pattern = "/\[(shortcode)([ ][a-zA-Z0-9\"'=\\s]*\\]|\\])/"; $matches = array(); preg_match($pattern, $string, $matches); print_r($matches);

preferences:
53.87 ms | 402 KiB | 5 Q