3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.84 ms | 1395 KiB | 19 Q