3v4l.org

run code in 300+ PHP versions simultaneously
<?php $json = '{"2":1}'; $obj = json_decode($json); $arr = get_object_vars($obj); $key = array_key_exists('2', $arr); var_dump($key, $arr);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CK2Zn
function name:  (null)
number of ops:  16
compiled vars:  !0 = $json, !1 = $obj, !2 = $arr, !3 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%7B%222%22%3A1%7D'
    3     1        INIT_FCALL                                               'json_decode'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $5      
          4        ASSIGN                                                   !1, $5
    4     5        INIT_FCALL                                               'get_object_vars'
          6        SEND_VAR                                                 !1
          7        DO_ICALL                                         $7      
          8        ASSIGN                                                   !2, $7
    5     9        ARRAY_KEY_EXISTS                                 ~9      '2', !2
         10        ASSIGN                                                   !3, ~9
    6    11        INIT_FCALL                                               'var_dump'
         12        SEND_VAR                                                 !3
         13        SEND_VAR                                                 !2
         14        DO_ICALL                                                 
         15      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.33 ms | 1394 KiB | 19 Q