3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo json_encode([ new \stdClass, new class{}, (object)[], ]);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kgj0i
function name:  (null)
number of ops:  14
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'json_encode'
    3     1        NEW                                              $0      'stdClass'
          2        DO_FCALL                                      0          
          3        INIT_ARRAY                                       ~2      $0
    4     4        DECLARE_ANON_CLASS                               <undef> 
          5        NEW                                              $4      $3
          6        DO_FCALL                                      0          
          7        ADD_ARRAY_ELEMENT                                ~2      $4
    5     8        CAST                                          8  ~6      <array>
          9        ADD_ARRAY_ELEMENT                                ~2      ~6
         10        SEND_VAL                                                 ~2
         11        DO_ICALL                                         $7      
         12        ECHO                                                     $7
    6    13      > RETURN                                                   1

Class class@anonymous: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.76 ms | 1394 KiB | 15 Q