3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data[1]= 'sdfsdf queue:name sdfsdaffasd'; preg_match('/queue:(.+\S)\s/', $data[1] ?? '', $matches, PREG_OFFSET_CAPTURE); $transportName = $matches[1] ?? ''; print_r($matches);
Output for 8.1.0 - 8.1.31, 8.2.0 - 8.2.27, 8.3.0 - 8.3.15, 8.4.1 - 8.4.2
Array ( [0] => Array ( [0] => queue:name [1] => 7 ) [1] => Array ( [0] => name [1] => 13 ) )

preferences:
41.34 ms | 406 KiB | 5 Q