3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php namespace X; $iterator = new \RegexIterator( new \ArrayIterator( ['A.phpt', 'B.phpt', 'C.phpt'] ) , '/\.phpt$/' , \RegexIterator::MATCH ) ; foreach ($iterator as $foo) { var_dump($foo); pcre_study('/\.phpt$/', '', ''); } echo "Done", PHP_EOL;
based on qbjZj
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = 11, Position 2 = 21
Branch analysis from position: 11
Jump found. Position 1 = 12, Position 2 = 21
Branch analysis from position: 12
Jump found. Position 1 = 11
Branch analysis from position: 11
Branch analysis from position: 21
Jump found. Position 1 = -2
Branch analysis from position: 21
filename:       /in/5ckJ4
function name:  (null)
number of ops:  26
compiled vars:  !0 = $iterator, !1 = $foo
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   6     0  E >   NEW                                              $2      :-6
   7     1        NEW                                              $3      :-4
   8     2        SEND_VAL_EX                                              <array>
         3        DO_FCALL                                      0          
         4        SEND_VAR_NO_REF                               0          $3
  11     5        SEND_VAL_EX                                              '%2F%5C.phpt%24%2F'
  13     6        FETCH_CONSTANT                                   ~5      'RegexIterator', 'MATCH'
         7        SEND_VAL_EX                                              ~5
         8        DO_FCALL                                      0          
         9        ASSIGN                                                   !0, $2
  17    10      > FE_RESET_R                                       $8      !0, ->21
        11    > > FE_FETCH_R                                               $8, !1, ->21
  18    12    >   INIT_NS_FCALL_BY_NAME                                    
        13        SEND_VAR_EX                                              !1
        14        DO_FCALL                                      0          
  19    15        INIT_NS_FCALL_BY_NAME                                    
        16        SEND_VAL_EX                                              '%2F%5C.phpt%24%2F'
        17        SEND_VAL_EX                                              ''
        18        SEND_VAL_EX                                              ''
        19        DO_FCALL                                      0          
        20      > JMP                                                      ->11
        21    >   FE_FREE                                                  $8
  22    22        ECHO                                                     'Done'
        23        FETCH_CONSTANT                                   ~11     'X%5CPHP_EOL'
        24        ECHO                                                     ~11
        25      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 7.3.0