3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = new stdClass; $a->hoge = "hooa!"; $r = array('hoge'=> $a); $b = json_encode($r); echo $b . PHP_EOL; print_r(json_decode($b,true));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vSAr1
function name:  (null)
number of ops:  21
compiled vars:  !0 = $a, !1 = $r, !2 = $b
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_OBJ                                               !0, 'hoge'
          4        OP_DATA                                                  'hooa%21'
    5     5        INIT_ARRAY                                       ~7      !0, 'hoge'
          6        ASSIGN                                                   !1, ~7
    7     7        INIT_FCALL                                               'json_encode'
          8        SEND_VAR                                                 !1
          9        DO_ICALL                                         $9      
         10        ASSIGN                                                   !2, $9
    8    11        CONCAT                                           ~11     !2, '%0A'
         12        ECHO                                                     ~11
    9    13        INIT_FCALL                                               'print_r'
         14        INIT_FCALL                                               'json_decode'
         15        SEND_VAR                                                 !2
         16        SEND_VAL                                                 <true>
         17        DO_ICALL                                         $12     
         18        SEND_VAR                                                 $12
         19        DO_ICALL                                                 
         20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.89 ms | 1395 KiB | 19 Q