3v4l.org

run code in 300+ PHP versions simultaneously
<?php $matchesMatches = function ($matches) { //$m = 1; //yield $m; // could put as a `for` so it is more optimized, but for now, that is premature optimization foreach ($matches as $match) { var_dump($match); // yeild $m; } }; $matches = [1,2, 3]; $matches = [1 => array('a', 'b'), 2 => array('c', 'd'), 3 => array('e', 'f')]; foreach ($matchesMatches($matches) as $m) { var_dump($m); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 8, Position 2 = 13
Branch analysis from position: 8
2 jumps found. (Code = 78) Position 1 = 9, Position 2 = 13
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
filename:       /in/1Z7PR
function name:  (null)
number of ops:  15
compiled vars:  !0 = $matchesMatches, !1 = $matches, !2 = $m
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2F1Z7PR%3A4%240'
    3     1        ASSIGN                                                   !0, ~3
   16     2        ASSIGN                                                   !1, <array>
   17     3        ASSIGN                                                   !1, <array>
   18     4        INIT_DYNAMIC_CALL                                        !0
          5        SEND_VAR_EX                                              !1
          6        DO_FCALL                                      0  $7      
          7      > FE_RESET_R                                       $8      $7, ->13
          8    > > FE_FETCH_R                                               $8, !2, ->13
   19     9    >   INIT_FCALL                                               'var_dump'
         10        SEND_VAR                                                 !2
         11        DO_ICALL                                                 
   18    12      > JMP                                                      ->8
         13    >   FE_FREE                                                  $8
   20    14      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2F1Z7PR%3A4%240:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 7
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 7
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
filename:       /in/1Z7PR
function name:  {closure}
number of ops:  9
compiled vars:  !0 = $matches, !1 = $match
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
   10     1      > FE_RESET_R                                       $2      !0, ->7
          2    > > FE_FETCH_R                                               $2, !1, ->7
   11     3    >   INIT_FCALL                                               'var_dump'
          4        SEND_VAR                                                 !1
          5        DO_ICALL                                                 
   10     6      > JMP                                                      ->2
          7    >   FE_FREE                                                  $2
   14     8      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2F1Z7PR%3A4%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.97 ms | 1396 KiB | 15 Q