3v4l.org

run code in 300+ PHP versions simultaneously
<?php function check_file_name($name) { return (bool) ((basename($name) == $name) && (substr($name, 1, 1) != '.')); } echo check_file_name('file.txt');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Mnpic
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   INIT_FCALL                                               'check_file_name'
          1        SEND_VAL                                                 'file.txt'
          2        DO_FCALL                                      0  $0      
          3        ECHO                                                     $0
          4      > RETURN                                                   1

Function check_file_name:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 6, Position 2 = 13
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
filename:       /in/Mnpic
function name:  check_file_name
number of ops:  16
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
    4     1        INIT_FCALL                                               'basename'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $1      
          4        IS_EQUAL                                         ~2      !0, $1
          5      > JMPZ_EX                                          ~2      ~2, ->13
          6    >   INIT_FCALL                                               'substr'
          7        SEND_VAR                                                 !0
          8        SEND_VAL                                                 1
          9        SEND_VAL                                                 1
         10        DO_ICALL                                         $3      
         11        IS_NOT_EQUAL                                     ~4      $3, '.'
         12        BOOL                                             ~2      ~4
         13    >   BOOL                                             ~5      ~2
         14      > RETURN                                                   ~5
    5    15*     > RETURN                                                   null

End of function check_file_name

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.84 ms | 1397 KiB | 18 Q