3v4l.org

run code in 300+ PHP versions simultaneously
<?php $json = new stdClass; $str = 'foo'; $abc = 'bar'; $json->$str = $abc; echo $json->$str; echo json_encode($json);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tNkdb
function name:  (null)
number of ops:  14
compiled vars:  !0 = $json, !1 = $str, !2 = $abc
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   NEW                                              $3      'stdClass'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $3
    3     3        ASSIGN                                                   !1, 'foo'
    4     4        ASSIGN                                                   !2, 'bar'
    5     5        ASSIGN_OBJ                                               !0, !1
          6        OP_DATA                                                  !2
    6     7        FETCH_OBJ_R                                      ~9      !0, !1
          8        ECHO                                                     ~9
    7     9        INIT_FCALL                                               'json_encode'
         10        SEND_VAR                                                 !0
         11        DO_ICALL                                         $10     
         12        ECHO                                                     $10
         13      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.03 ms | 1394 KiB | 15 Q