3v4l.org

run code in 300+ PHP versions simultaneously
<?php $myvar = FALSE; $my_other_var = 4; $third_var = 10; $dc_tx = 22; // Good practice to initialise variables. $result = FALSE; // If required, this comment will explain what we're about to do. if (isset($myvar)) { // This comment would explain why we are adding 6 to myvar. $result = $myvar + 6; } elseif (!empty($my_other_var)) { // This comment explains why we got here and why we're about // to add these two variables together. $result = $myvar + $third_var; } else { // Explain why we're using this var as the result. $result = $dc_tx; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 10
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 16
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mcOFb
function name:  (null)
number of ops:  18
compiled vars:  !0 = $myvar, !1 = $my_other_var, !2 = $third_var, !3 = $dc_tx, !4 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <false>
    4     1        ASSIGN                                                   !1, 4
    5     2        ASSIGN                                                   !2, 10
    6     3        ASSIGN                                                   !3, 22
    9     4        ASSIGN                                                   !4, <false>
   12     5        ISSET_ISEMPTY_CV                                         !0
          6      > JMPZ                                                     ~10, ->10
   14     7    >   ADD                                              ~11     !0, 6
          8        ASSIGN                                                   !4, ~11
          9      > JMP                                                      ->17
   16    10    >   ISSET_ISEMPTY_CV                                 ~13     !1
         11        BOOL_NOT                                         ~14     ~13
         12      > JMPZ                                                     ~14, ->16
   19    13    >   ADD                                              ~15     !0, !2
         14        ASSIGN                                                   !4, ~15
         15      > JMP                                                      ->17
   23    16    >   ASSIGN                                                   !4, !3
   24    17    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.84 ms | 1394 KiB | 13 Q