3v4l.org

run code in 500+ PHP versions simultaneously
<?php for ($i = 0; $i < 1000; $i++) { $pathname = "sites/all/modules/foo$i/foo_sub$i/foo_sub$i.info.yml"; assert($pathname[0] !== '/' && array_key_exists('path', parse_url($pathname)) && count(array_keys(parse_url($pathname))) === 1, 'The relative path and filename is invalid. A path relative to the Drupal root is expected, for example: "core/modules/node/node.info.yml".'); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 34
Branch analysis from position: 34
2 jumps found. (Code = 44) Position 1 = 36, Position 2 = 2
Branch analysis from position: 36
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 2
2 jumps found. (Code = 46) Position 1 = 15, Position 2 = 20
Branch analysis from position: 15
2 jumps found. (Code = 46) Position 1 = 21, Position 2 = 30
Branch analysis from position: 21
2 jumps found. (Code = 44) Position 1 = 36, Position 2 = 2
Branch analysis from position: 36
Branch analysis from position: 2
Branch analysis from position: 30
Branch analysis from position: 20
filename:       /in/F8tfF
function name:  (null)
number of ops:  37
compiled vars:  !0 = $i, !1 = $pathname
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, 0
          1      > JMP                                                          ->34
    4     2    >   ROPE_INIT                                         7  ~4      'sites%2Fall%2Fmodules%2Ffoo'
          3        ROPE_ADD                                          1  ~4      ~4, !0
          4        ROPE_ADD                                          2  ~4      ~4, '%2Ffoo_sub'
          5        ROPE_ADD                                          3  ~4      ~4, !0
          6        ROPE_ADD                                          4  ~4      ~4, '%2Ffoo_sub'
          7        ROPE_ADD                                          5  ~4      ~4, !0
          8        ROPE_END                                          6  ~3      ~4, '.info.yml'
          9        ASSIGN                                                       !1, ~3
    5    10        ASSERT_CHECK                                                 
         11        INIT_FCALL                                                   'assert'
         12        FETCH_DIM_R                                          ~9      !1, 0
         13        IS_NOT_IDENTICAL                                     ~10     ~9, '%2F'
         14      > JMPZ_EX                                              ~10     ~10, ->20
         15    >   INIT_FCALL                                                   'parse_url'
         16        SEND_VAR                                                     !1
         17        DO_ICALL                                             $11     
         18        ARRAY_KEY_EXISTS                                     ~12     'path', $11
         19        BOOL                                                 ~10     ~12
         20    > > JMPZ_EX                                              ~10     ~10, ->30
         21    >   INIT_FCALL                                                   'array_keys'
         22        INIT_FCALL                                                   'parse_url'
         23        SEND_VAR                                                     !1
         24        DO_ICALL                                             $13     
         25        SEND_VAR                                                     $13
         26        DO_ICALL                                             $14     
         27        COUNT                                                ~15     $14
         28        IS_IDENTICAL                                         ~16     ~15, 1
         29        BOOL                                                 ~10     ~16
         30    >   SEND_VAL                                                     ~10
         31        SEND_VAL                                                     'The+relative+path+and+filename+is+invalid.+A+path+relative+to+the+Drupal+root+is+expected%2C+for+example%3A+%22core%2Fmodules%2Fnode%2Fnode.info.yml%22.'
         32        DO_ICALL                                                     
    3    33        PRE_INC                                                      !0
         34    >   IS_SMALLER                                                   !0, 1000
         35      > JMPNZ                                                        ~19, ->2
    6    36    > > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
166.54 ms | 2277 KiB | 16 Q