3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public function doSomething() { die; yield; } } $foo = new Foo(); $foo->doSomething(); echo 'im not dead'; foreach ($foo->doSomething() as $f) {}
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 9, Position 2 = 11
Branch analysis from position: 9
2 jumps found. (Code = 78) Position 1 = 10, Position 2 = 11
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
filename:       /in/sdE0l
function name:  (null)
number of ops:  13
compiled vars:  !0 = $foo, !1 = $f
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   NEW                                              $2      'Foo'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   13     3        INIT_METHOD_CALL                                         !0, 'doSomething'
          4        DO_FCALL                                      0          
   14     5        ECHO                                                     'im+not+dead'
   15     6        INIT_METHOD_CALL                                         !0, 'doSomething'
          7        DO_FCALL                                      0  $6      
          8      > FE_RESET_R                                       $7      $6, ->11
          9    > > FE_FETCH_R                                               $7, !1, ->11
         10    > > JMP                                                      ->9
         11    >   FE_FREE                                                  $7
         12      > RETURN                                                   1

Class Foo:
Function dosomething:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 79) Position 1 = -2
filename:       /in/sdE0l
function name:  doSomething
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   GENERATOR_CREATE                                         
    7     1      > EXIT                                                     
    8     2*       YIELD                                                    
    9     3*     > GENERATOR_RETURN                                         

End of function dosomething

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.72 ms | 1394 KiB | 13 Q