3v4l.org

run code in 300+ PHP versions simultaneously
<?php $filename = "music.mp4for"; if (substr($filename, -3) == 'mp3') { } elseif (substr($filename, -3) == 'mp4') { } elseif (substr($filename, -3) == 'pdf') { } elseif (substr($filename, -3) == 'epub') { } elseif (substr($filename, -3) == 'doc') { } elseif (substr($filename, -3) == 'zip') { } else { echo "exited"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 8
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 44
Branch analysis from position: 44
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 15
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 44
Branch analysis from position: 44
Branch analysis from position: 15
2 jumps found. (Code = 43) Position 1 = 21, Position 2 = 22
Branch analysis from position: 21
1 jumps found. (Code = 42) Position 1 = 44
Branch analysis from position: 44
Branch analysis from position: 22
2 jumps found. (Code = 43) Position 1 = 28, Position 2 = 29
Branch analysis from position: 28
1 jumps found. (Code = 42) Position 1 = 44
Branch analysis from position: 44
Branch analysis from position: 29
2 jumps found. (Code = 43) Position 1 = 35, Position 2 = 36
Branch analysis from position: 35
1 jumps found. (Code = 42) Position 1 = 44
Branch analysis from position: 44
Branch analysis from position: 36
2 jumps found. (Code = 43) Position 1 = 42, Position 2 = 43
Branch analysis from position: 42
1 jumps found. (Code = 42) Position 1 = 44
Branch analysis from position: 44
Branch analysis from position: 43
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/OcUtH
function name:  (null)
number of ops:  45
compiled vars:  !0 = $filename
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'music.mp4for'
    6     1        INIT_FCALL                                               'substr'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 -3
          4        DO_ICALL                                         $2      
          5        IS_EQUAL                                                 $2, 'mp3'
          6      > JMPZ                                                     ~3, ->8
          7    > > JMP                                                      ->44
    8     8    >   INIT_FCALL                                               'substr'
          9        SEND_VAR                                                 !0
         10        SEND_VAL                                                 -3
         11        DO_ICALL                                         $4      
         12        IS_EQUAL                                                 $4, 'mp4'
         13      > JMPZ                                                     ~5, ->15
         14    > > JMP                                                      ->44
   10    15    >   INIT_FCALL                                               'substr'
         16        SEND_VAR                                                 !0
         17        SEND_VAL                                                 -3
         18        DO_ICALL                                         $6      
         19        IS_EQUAL                                                 $6, 'pdf'
         20      > JMPZ                                                     ~7, ->22
         21    > > JMP                                                      ->44
   12    22    >   INIT_FCALL                                               'substr'
         23        SEND_VAR                                                 !0
         24        SEND_VAL                                                 -3
         25        DO_ICALL                                         $8      
         26        IS_EQUAL                                                 $8, 'epub'
         27      > JMPZ                                                     ~9, ->29
         28    > > JMP                                                      ->44
   14    29    >   INIT_FCALL                                               'substr'
         30        SEND_VAR                                                 !0
         31        SEND_VAL                                                 -3
         32        DO_ICALL                                         $10     
         33        IS_EQUAL                                                 $10, 'doc'
         34      > JMPZ                                                     ~11, ->36
         35    > > JMP                                                      ->44
   16    36    >   INIT_FCALL                                               'substr'
         37        SEND_VAR                                                 !0
         38        SEND_VAL                                                 -3
         39        DO_ICALL                                         $12     
         40        IS_EQUAL                                                 $12, 'zip'
         41      > JMPZ                                                     ~13, ->43
         42    > > JMP                                                      ->44
   17    43    >   ECHO                                                     'exited'
         44    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.27 ms | 1400 KiB | 15 Q