3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = new stdClass; $a->hoge = "hooa!"; $b = json_encode($a); 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/rAHMW
function name:  (null)
number of ops:  19
compiled vars:  !0 = $a, !1 = $b
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, 'hoge'
          4        OP_DATA                                                  'hooa%21'
    6     5        INIT_FCALL                                               'json_encode'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                         $6      
          8        ASSIGN                                                   !1, $6
    7     9        CONCAT                                           ~8      !1, '%0A'
         10        ECHO                                                     ~8
    8    11        INIT_FCALL                                               'print_r'
         12        INIT_FCALL                                               'json_decode'
         13        SEND_VAR                                                 !1
         14        SEND_VAL                                                 <true>
         15        DO_ICALL                                         $9      
         16        SEND_VAR                                                 $9
         17        DO_ICALL                                                 
         18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
168.19 ms | 1394 KiB | 19 Q