3v4l.org

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

Class foo: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.08 ms | 1394 KiB | 19 Q