3v4l.org

run code in 300+ PHP versions simultaneously
<?php $directory = array ( 0 => '.', 1 => '..', 2 => '.ftpquota', 3 => 'error_log', 4 => 'index.php', 5 => 'index2.php' ); $directory = array_filter($directory, function ($name) { return !in_array($name, array('.', '..')); }); print_r($directory); $directory = array ( 0 => '.', 1 => '..', 2 => '.ftpquota', 3 => 'error_log', 4 => 'index.php', 5 => 'index2.php' ); $directory = array_filter($directory, function ($name) { return !preg_match('/^\.\.?$/', $name); }); print_r($directory);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Qe6rl
function name:  (null)
number of ops:  21
compiled vars:  !0 = $directory
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   12     1        INIT_FCALL                                               'array_filter'
          2        SEND_VAR                                                 !0
          3        DECLARE_LAMBDA_FUNCTION                          ~2      [0]
   14     4        SEND_VAL                                                 ~2
   12     5        DO_ICALL                                         $3      
          6        ASSIGN                                                   !0, $3
   15     7        INIT_FCALL                                               'print_r'
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                                 
   17    10        ASSIGN                                                   !0, <array>
   26    11        INIT_FCALL                                               'array_filter'
         12        SEND_VAR                                                 !0
         13        DECLARE_LAMBDA_FUNCTION                          ~7      [1]
   28    14        SEND_VAL                                                 ~7
   26    15        DO_ICALL                                         $8      
         16        ASSIGN                                                   !0, $8
   29    17        INIT_FCALL                                               'print_r'
         18        SEND_VAR                                                 !0
         19        DO_ICALL                                                 
         20      > RETURN                                                   1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Qe6rl
function name:  {closure}
number of ops:  5
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   RECV                                             !0      
   13     1        IN_ARRAY                                         ~1      !0, <array>
          2        BOOL_NOT                                         ~2      ~1
          3      > RETURN                                                   ~2
   14     4*     > RETURN                                                   null

End of Dynamic Function 0

Dynamic Function 1
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Qe6rl
function name:  {closure}
number of ops:  8
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   26     0  E >   RECV                                             !0      
   27     1        INIT_FCALL                                               'preg_match'
          2        SEND_VAL                                                 '%2F%5E%5C.%5C.%3F%24%2F'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $1      
          5        BOOL_NOT                                         ~2      $1
          6      > RETURN                                                   ~2
   28     7*     > RETURN                                                   null

End of Dynamic Function 1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
137.49 ms | 1001 KiB | 16 Q