3v4l.org

run code in 300+ PHP versions simultaneously
<?php class foo { function bar() { var_dump($this instanceof foo); yield; } } (new foo)->bar()->next();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7aqBL
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   NEW                                              $0      'foo'
          1        DO_FCALL                                      0          
          2        INIT_METHOD_CALL                                         $0, 'bar'
          3        DO_FCALL                                      0  $2      
          4        INIT_METHOD_CALL                                         $2, 'next'
          5        DO_FCALL                                      0          
          6      > RETURN                                                   1

Class foo:
Function bar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 161) Position 1 = -2
filename:       /in/7aqBL
function name:  bar
number of ops:  8
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   GENERATOR_CREATE                                         
    5     1        INIT_FCALL                                               'var_dump'
          2        FETCH_THIS                                       ~0      
          3        INSTANCEOF                                       ~1      ~0, 'foo'
          4        SEND_VAL                                                 ~1
          5        DO_ICALL                                                 
    6     6        YIELD                                                    
    7     7      > GENERATOR_RETURN                                         

End of function bar

End of class foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
176.66 ms | 1394 KiB | 15 Q