3v4l.org

run code in 300+ PHP versions simultaneously
<?php $var = new stdClass(); $var->{1} = 1; $var->{2} = 2; var_dump($var); $test = json_decode(json_encode($var), true); var_dump($test); var_dump(array_key_exists(2, $test));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4mXX2
function name:  (null)
number of ops:  26
compiled vars:  !0 = $var, !1 = $test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $2      'stdClass'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
    4     3        ASSIGN_OBJ                                               !0, '1'
          4        OP_DATA                                                  1
    5     5        ASSIGN_OBJ                                               !0, '2'
          6        OP_DATA                                                  2
    6     7        INIT_FCALL                                               'var_dump'
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                                 
    7    10        INIT_FCALL                                               'json_decode'
         11        INIT_FCALL                                               'json_encode'
         12        SEND_VAR                                                 !0
         13        DO_ICALL                                         $8      
         14        SEND_VAR                                                 $8
         15        SEND_VAL                                                 <true>
         16        DO_ICALL                                         $9      
         17        ASSIGN                                                   !1, $9
    9    18        INIT_FCALL                                               'var_dump'
         19        SEND_VAR                                                 !1
         20        DO_ICALL                                                 
   10    21        INIT_FCALL                                               'var_dump'
         22        ARRAY_KEY_EXISTS                                 ~12     2, !1
         23        SEND_VAL                                                 ~12
         24        DO_ICALL                                                 
         25      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
141.02 ms | 1395 KiB | 19 Q