3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public function doSomething() { die; yield; } } $foo = new Foo(); $foo->doSomething(); foreach ($foo as $f) {} echo 'im not dead';
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 6, Position 2 = 8
Branch analysis from position: 6
2 jumps found. (Code = 78) Position 1 = 7, Position 2 = 8
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
filename:       /in/Np7DF
function name:  (null)
number of ops:  11
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          
   15     5      > FE_RESET_R                                       $6      !0, ->8
          6    > > FE_FETCH_R                                               $6, !1, ->8
          7    > > JMP                                                      ->6
          8    >   FE_FREE                                                  $6
   16     9        ECHO                                                     'im+not+dead'
         10      > RETURN                                                   1

Class Foo:
Function dosomething:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 79) Position 1 = -2
filename:       /in/Np7DF
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:
151.53 ms | 1394 KiB | 13 Q