3v4l.org

run code in 300+ PHP versions simultaneously
<?php if(version_compare(PHP_VERSION, '5.3') < 0) { echo 'unsupported version'; return; } $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 = 6, Position 2 = 8
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 11
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
2 jumps found. (Code = 77) Position 1 = 17, Position 2 = 24
Branch analysis from position: 17
2 jumps found. (Code = 78) Position 1 = 18, Position 2 = 24
Branch analysis from position: 18
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
Branch analysis from position: 24
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 24
Branch analysis from position: 11
2 jumps found. (Code = 77) Position 1 = 17, Position 2 = 24
Branch analysis from position: 17
Branch analysis from position: 24
filename:       /in/aB4Eg
function name:  (null)
number of ops:  26
compiled vars:  !0 = $j0, !1 = $j1, !2 = $i, !3 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'version_compare'
          1        SEND_VAL                                                 '8.0.0'
          2        SEND_VAL                                                 '5.3'
          3        DO_ICALL                                         $4      
          4        IS_SMALLER                                               $4, 0
          5      > JMPZ                                                     ~5, ->8
    3     6    >   ECHO                                                     'unsupported+version'
    4     7      > RETURN                                                   null
    7     8    > > JMPZ                                                     <true>, ->11
          9    >   QM_ASSIGN                                        ~6      128
         10      > JMP                                                      ->12
         11    >   QM_ASSIGN                                        ~6      0
         12    >   ASSIGN                                                   !0, ~6
    8    13        FETCH_CONSTANT                                   ~8      '%C2%A0JSON_FORCE_OBJECT'
         14        BW_OR                                            ~9      !0, ~8
         15        ASSIGN                                                   !1, ~9
   12    16      > FE_RESET_R                                       $11     <array>, ->24
         17    > > FE_FETCH_R                                               $11, !2, ->24
   15    18    >   INIT_FCALL                                               'json_encode'
         19        SEND_VAR                                                 !3
         20        SEND_VAL                                                 16
         21        DO_ICALL                                         $12     
         22        ECHO                                                     $12
   12    23      > JMP                                                      ->17
         24    >   FE_FREE                                                  $11
   16    25      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.12 ms | 1396 KiB | 17 Q