3v4l.org

run code in 300+ PHP versions simultaneously
<?php $pattern = '/access_token=\K[^&\s]+/'; $subject = "https://WBSITE_LINK.com/#access_token=1b6e37716abdh&state=state123&scope=profile%20booking&token_type=bearer&expires_in=15552000"; preg_match($pattern, $subject, $matches); echo $matches[0];
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Ys9qq
function name:  (null)
number of ops:  10
compiled vars:  !0 = $pattern, !1 = $subject, !2 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%2Faccess_token%3D%5CK%5B%5E%26%5Cs%5D%2B%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'
    5     2        INIT_FCALL                                               'preg_match'
          3        SEND_VAR                                                 !0
          4        SEND_VAR                                                 !1
          5        SEND_REF                                                 !2
          6        DO_ICALL                                                 
    6     7        FETCH_DIM_R                                      ~6      !2, 0
          8        ECHO                                                     ~6
          9      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.06 ms | 1009 KiB | 14 Q