3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = "{\"gid\":\"0021ed2003ba\",\"cadinfo\":{\"serialno\":\"00000000000959\",\"modelnum\":\"GW357-10-0-0-1-0\"}}"; $v = json_decode($str); echo $v->{"gid"}; ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bkNb3
function name:  (null)
number of ops:  8
compiled vars:  !0 = $str, !1 = $v
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%7B%22gid%22%3A%220021ed2003ba%22%2C%22cadinfo%22%3A%7B%22serialno%22%3A%2200000000000959%22%2C%22modelnum%22%3A%22GW357-10-0-0-1-0%22%7D%7D'
    3     1        INIT_FCALL                                               'json_decode'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $3      
          4        ASSIGN                                                   !1, $3
    4     5        FETCH_OBJ_R                                      ~5      !1, 'gid'
          6        ECHO                                                     ~5
    5     7      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.21 ms | 1385 KiB | 15 Q