3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str ='HTTP/1.1 200 OK Server: YYYYYYYYY Content-Type: application/json Content-Length: 163 X-OAPI-Request-Id: XXXXXXXXXXXXXX { "token_type": "berber", "access_token": "XXXXXXXXYYYYYYY", "expires_in": "7776000" }'; $arr = json_decode(substr($str,strpos($str,"{")), true); Var_dump($arr);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/r8VgO
function name:  (null)
number of ops:  18
compiled vars:  !0 = $str, !1 = $arr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'HTTP%2F1.1+200+OK%0AServer%3A+YYYYYYYYY%0AContent-Type%3A+application%2Fjson%0AContent-Length%3A+163%0AX-OAPI-Request-Id%3A+XXXXXXXXXXXXXX%0A%7B%0A++%22token_type%22%3A+%22berber%22%2C%0A++%22access_token%22%3A+%22XXXXXXXXYYYYYYY%22%2C%0A++%22expires_in%22%3A+%227776000%22%0A%7D'
   14     1        INIT_FCALL                                               'json_decode'
          2        INIT_FCALL                                               'substr'
          3        SEND_VAR                                                 !0
          4        INIT_FCALL                                               'strpos'
          5        SEND_VAR                                                 !0
          6        SEND_VAL                                                 '%7B'
          7        DO_ICALL                                         $3      
          8        SEND_VAR                                                 $3
          9        DO_ICALL                                         $4      
         10        SEND_VAR                                                 $4
         11        SEND_VAL                                                 <true>
         12        DO_ICALL                                         $5      
         13        ASSIGN                                                   !1, $5
   15    14        INIT_FCALL                                               'var_dump'
         15        SEND_VAR                                                 !1
         16        DO_ICALL                                                 
         17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.57 ms | 1005 KiB | 18 Q