3v4l.org

run code in 300+ PHP versions simultaneously
<?php if (class_exists('\Generator')) { function toto (array $args) { foreach ($args as $key => $value) { yield $key => $value; } } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 5
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
filename:       /in/25OLT
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'class_exists'
          1        SEND_VAL                                                 '%5CGenerator'
          2        DO_ICALL                                         $0      
          3      > JMPZ                                                     $0, ->5
    4     4    >   DECLARE_FUNCTION                                         'toto'
    9     5    > > RETURN                                                   1

Function %00toto%2Fin%2F25OLT%3A4%240:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 7
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 7
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 7
1 jumps found. (Code = 161) Position 1 = -2
Branch analysis from position: 7
filename:       /in/25OLT
function name:  toto
number of ops:  9
compiled vars:  !0 = $args, !1 = $value, !2 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
          1        GENERATOR_CREATE                                         
    5     2      > FE_RESET_R                                       $3      !0, ->7
          3    > > FE_FETCH_R                                       ~4      $3, !1, ->7
          4    >   ASSIGN                                                   !2, ~4
    6     5        YIELD                                                    !1, !2
    5     6      > JMP                                                      ->3
          7    >   FE_FREE                                                  $3
    8     8      > GENERATOR_RETURN                                         

End of function %00toto%2Fin%2F25OLT%3A4%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.7 ms | 1395 KiB | 15 Q