3v4l.org

run code in 300+ PHP versions simultaneously
<?php $j0 = defined('JSON_PRETTY_PRINT') ? JSON_PRETTY_PRINT : 0; $j1 = $j0 | JSON_FORCE_OBJECT; foreach( array( array() ) as $i) { echo json_encode($foo, JSON_FORCE_OBJECT); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 1, Position 2 = 3
Branch analysis from position: 1
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
2 jumps found. (Code = 77) Position 1 = 9, Position 2 = 16
Branch analysis from position: 9
2 jumps found. (Code = 78) Position 1 = 10, Position 2 = 16
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
Branch analysis from position: 3
2 jumps found. (Code = 77) Position 1 = 9, Position 2 = 16
Branch analysis from position: 9
Branch analysis from position: 16
filename:       /in/9Q2T5
function name:  (null)
number of ops:  18
compiled vars:  !0 = $j0, !1 = $j1, !2 = $i, !3 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E > > JMPZ                                                     <true>, ->3
          1    >   QM_ASSIGN                                        ~4      128
          2      > JMP                                                      ->4
          3    >   QM_ASSIGN                                        ~4      0
          4    >   ASSIGN                                                   !0, ~4
    3     5        FETCH_CONSTANT                                   ~6      '%C2%A0JSON_FORCE_OBJECT'
          6        BW_OR                                            ~7      !0, ~6
          7        ASSIGN                                                   !1, ~7
    7     8      > FE_RESET_R                                       $9      <array>, ->16
          9    > > FE_FETCH_R                                               $9, !2, ->16
   10    10    >   INIT_FCALL                                               'json_encode'
         11        SEND_VAR                                                 !3
         12        SEND_VAL                                                 16
         13        DO_ICALL                                         $10     
         14        ECHO                                                     $10
    7    15      > JMP                                                      ->9
         16    >   FE_FREE                                                  $9
   11    17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.66 ms | 1395 KiB | 15 Q