3v4l.org

run code in 300+ PHP versions simultaneously
<?php $re = '/access_token=(.*?)(&|$)/'; $str = 'https://wbsite_link.com/#access_token=1b6e37716abdh&state=state123&scope=profile%20booking&token_type=bearer&expires_in=15552000'; preg_match($re, $str, $match); // Print the token: Echo $match[1];
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/e54GC
function name:  (null)
number of ops:  10
compiled vars:  !0 = $re, !1 = $str, !2 = $match
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%2Faccess_token%3D%28.%2A%3F%29%28%26%7C%24%29%2F'
    4     1        ASSIGN                                                   !1, 'https%3A%2F%2Fwbsite_link.com%2F%23access_token%3D1b6e37716abdh%26state%3Dstate123%26scope%3Dprofile%2520booking%26token_type%3Dbearer%26expires_in%3D15552000'
    6     2        INIT_FCALL                                               'preg_match'
          3        SEND_VAR                                                 !0
          4        SEND_VAR                                                 !1
          5        SEND_REF                                                 !2
          6        DO_ICALL                                                 
    9     7        FETCH_DIM_R                                      ~6      !2, 1
          8        ECHO                                                     ~6
          9      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.31 ms | 1079 KiB | 14 Q