3v4l.org

run code in 300+ PHP versions simultaneously
<?php $i = 0; $n = 1; while ($i < $n && magic()) { $i++; } function magic() { echo 'executed' . PHP_EOL; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
2 jumps found. (Code = 46) Position 1 = 6, Position 2 = 9
Branch analysis from position: 6
2 jumps found. (Code = 44) Position 1 = 10, Position 2 = 3
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
2 jumps found. (Code = 46) Position 1 = 6, Position 2 = 9
Branch analysis from position: 6
Branch analysis from position: 9
Branch analysis from position: 9
filename:       /in/tvK9d
function name:  (null)
number of ops:  11
compiled vars:  !0 = $i, !1 = $n
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 0
    4     1        ASSIGN                                                   !1, 1
    5     2      > JMP                                                      ->4
    6     3    >   PRE_INC                                                  !0
    5     4    >   IS_SMALLER                                       ~5      !0, !1
          5      > JMPZ_EX                                          ~5      ~5, ->9
          6    >   INIT_FCALL_BY_NAME                                       'magic'
          7        DO_FCALL                                      0  $6      
          8        BOOL                                             ~5      $6
          9    > > JMPNZ                                                    ~5, ->3
   11    10    > > RETURN                                                   1

Function magic:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tvK9d
function name:  magic
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   ECHO                                                     'executed%0A'
   11     1      > RETURN                                                   null

End of function magic

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
168.22 ms | 1393 KiB | 13 Q