3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = new StdClass(); $a->hoeg = "huga"; echo json_encode($a) . PHP_EOL; echo json_encode($a,JSON_FORCE_OBJECT) . PHP_EOL;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pgsF0
function name:  (null)
number of ops:  17
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $1      'StdClass'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
    4     3        ASSIGN_OBJ                                               !0, 'hoeg'
          4        OP_DATA                                                  'huga'
    5     5        INIT_FCALL                                               'json_encode'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                         $5      
          8        CONCAT                                           ~6      $5, '%0A'
          9        ECHO                                                     ~6
    6    10        INIT_FCALL                                               'json_encode'
         11        SEND_VAR                                                 !0
         12        SEND_VAL                                                 16
         13        DO_ICALL                                         $7      
         14        CONCAT                                           ~8      $7, '%0A'
         15        ECHO                                                     ~8
         16      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.95 ms | 1394 KiB | 15 Q