3v4l.org

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

Class class@anonymous: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.25 ms | 1436 KiB | 15 Q