3v4l.org

run code in 300+ PHP versions simultaneously
<?php $it = new \ArrayIterator(array("tmp", "foo", "bar", "bazbar")); $it = new \RegexIterator($it, "/ba(.)/", \RegexIterator::ALL_MATCHES); echo count(iterator_to_array($it));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/54duh
function name:  (null)
number of ops:  16
compiled vars:  !0 = $it
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $1      'ArrayIterator'
          1        SEND_VAL_EX                                              <array>
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
    4     4        NEW                                              $4      'RegexIterator'
          5        SEND_VAR_EX                                              !0
          6        SEND_VAL_EX                                              '%2Fba%28.%29%2F'
          7        SEND_VAL_EX                                              2
          8        DO_FCALL                                      0          
          9        ASSIGN                                                   !0, $4
    5    10        INIT_FCALL                                               'iterator_to_array'
         11        SEND_VAR                                                 !0
         12        DO_ICALL                                         $7      
         13        COUNT                                            ~8      $7
         14        ECHO                                                     ~8
         15      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
174.63 ms | 1394 KiB | 15 Q