3v4l.org

run code in 300+ PHP versions simultaneously
<?php $pattern = '/lejebolig/*.html'; var_dump(fnmatch($pattern, 'lejebolig/1.html') || fnmatch(ltrim($pattern,'/'), 'lejebolig/1.html'));
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 47) Position 1 = 7, Position 2 = 16
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
filename:       /in/BRYAv
function name:  (null)
number of ops:  19
compiled vars:  !0 = $pattern
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%2Flejebolig%2F%2A.html'
    3     1        INIT_FCALL                                               'var_dump'
          2        INIT_FCALL                                               'fnmatch'
          3        SEND_VAR                                                 !0
          4        SEND_VAL                                                 'lejebolig%2F1.html'
          5        DO_ICALL                                         $2      
          6      > JMPNZ_EX                                         ~3      $2, ->16
          7    >   INIT_FCALL                                               'fnmatch'
          8        INIT_FCALL                                               'ltrim'
          9        SEND_VAR                                                 !0
         10        SEND_VAL                                                 '%2F'
         11        DO_ICALL                                         $4      
         12        SEND_VAR                                                 $4
         13        SEND_VAL                                                 'lejebolig%2F1.html'
         14        DO_ICALL                                         $5      
         15        BOOL                                             ~3      $5
         16    >   SEND_VAL                                                 ~3
         17        DO_ICALL                                                 
         18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
172.44 ms | 1395 KiB | 19 Q