3v4l.org

run code in 300+ PHP versions simultaneously
<?php function fileIsNotIncluded($file = null) { if (empty($file)) { return false; } // Pega os nomes dos arquivos já incluídos com as funções "include", "include_once", "require" e "require_once" $includedFiles = get_included_files(); if ( ! in_array($file, $includedFiles)) { return true; } return false; } var_dump( fileIsNotIncluded('Teste.php') );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pcm04
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'fileisnotincluded'
          2        SEND_VAL                                                 'Teste.php'
          3        DO_FCALL                                      0  $0      
          4        SEND_VAR                                                 $0
          5        DO_ICALL                                                 
          6      > RETURN                                                   1

Function fileisnotincluded:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 4
Branch analysis from position: 3
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 14
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pcm04
function name:  fileIsNotIncluded
number of ops:  16
compiled vars:  !0 = $file, !1 = $includedFiles
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV_INIT                                        !0      null
    4     1        ISSET_ISEMPTY_CV                                         !0
          2      > JMPZ                                                     ~2, ->4
    5     3    > > RETURN                                                   <false>
    9     4    >   INIT_FCALL                                               'get_included_files'
          5        DO_ICALL                                         $3      
          6        ASSIGN                                                   !1, $3
   11     7        INIT_FCALL                                               'in_array'
          8        SEND_VAR                                                 !0
          9        SEND_VAR                                                 !1
         10        DO_ICALL                                         $5      
         11        BOOL_NOT                                         ~6      $5
         12      > JMPZ                                                     ~6, ->14
   12    13    > > RETURN                                                   <true>
   15    14    > > RETURN                                                   <false>
   16    15*     > RETURN                                                   null

End of function fileisnotincluded

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.41 ms | 1399 KiB | 20 Q