3v4l.org

run code in 300+ PHP versions simultaneously
<?php $obj = new stdClass(); $obj->a = 1; $obj->b = 2; $obj->c = array('sub'=>1, 'hello'=>'world'); print_r(json_encode($obj, true));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6fiTd
function name:  (null)
number of ops:  17
compiled vars:  !0 = $obj
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $1      'stdClass'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
    4     3        ASSIGN_OBJ                                               !0, 'a'
          4        OP_DATA                                                  1
    5     5        ASSIGN_OBJ                                               !0, 'b'
          6        OP_DATA                                                  2
    6     7        ASSIGN_OBJ                                               !0, 'c'
          8        OP_DATA                                                  <array>
    9     9        INIT_FCALL                                               'print_r'
         10        INIT_FCALL                                               'json_encode'
         11        SEND_VAR                                                 !0
         12        SEND_VAL                                                 <true>
         13        DO_ICALL                                         $7      
         14        SEND_VAR                                                 $7
         15        DO_ICALL                                                 
         16      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.68 ms | 1394 KiB | 17 Q