3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $s = "Bearer: 1234adfasdf"; preg_match('~Bearer:\s(?P<access_token>\S+)~', $s, $m); var_dump($m);
Output for 4.3.3 - 7.1.0
array(3) { [0]=> string(19) "Bearer: 1234adfasdf" ["access_token"]=> string(11) "1234adfasdf" [1]=> string(11) "1234adfasdf" }
Output for 4.3.0 - 4.3.2
array(2) { [0]=> string(19) "Bearer: 1234adfasdf" [1]=> string(11) "1234adfasdf" }