3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo json_encode([], JSON_FORCE_OBJECT); echo json_encode(['test' => []], JSON_FORCE_OBJECT); echo json_encode(['test' => [1,2,3]], JSON_FORCE_OBJECT);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/eCgFg
function name:  (null)
number of ops:  19
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   INIT_FCALL                                               'json_encode'
          1        SEND_VAL                                                 <array>
          2        FETCH_CONSTANT                                   ~0      '%C2%A0JSON_FORCE_OBJECT'
          3        SEND_VAL                                                 ~0
          4        DO_ICALL                                         $1      
          5        ECHO                                                     $1
    5     6        INIT_FCALL                                               'json_encode'
          7        SEND_VAL                                                 <array>
          8        FETCH_CONSTANT                                   ~2      '%C2%A0JSON_FORCE_OBJECT'
          9        SEND_VAL                                                 ~2
         10        DO_ICALL                                         $3      
         11        ECHO                                                     $3
    6    12        INIT_FCALL                                               'json_encode'
         13        SEND_VAL                                                 <array>
         14        FETCH_CONSTANT                                   ~4      '%C2%A0JSON_FORCE_OBJECT'
         15        SEND_VAL                                                 ~4
         16        DO_ICALL                                         $5      
         17        ECHO                                                     $5
         18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.16 ms | 1394 KiB | 15 Q