3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public $bar = 'a'; public function doSomething() { $this->bar = 'b'; yield; } } $foo = new Foo(); var_dump($foo); $foo->doSomething(); var_dump($foo);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/l03aQ
function name:  (null)
number of ops:  12
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   NEW                                              $1      'Foo'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   16     3        INIT_FCALL                                               'var_dump'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                                 
   17     6        INIT_METHOD_CALL                                         !0, 'doSomething'
          7        DO_FCALL                                      0          
   18     8        INIT_FCALL                                               'var_dump'
          9        SEND_VAR                                                 !0
         10        DO_ICALL                                                 
         11      > RETURN                                                   1

Class Foo:
Function dosomething:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 161) Position 1 = -2
filename:       /in/l03aQ
function name:  doSomething
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   GENERATOR_CREATE                                         
   10     1        ASSIGN_OBJ                                               'bar'
          2        OP_DATA                                                  'b'
   11     3        YIELD                                                    
   12     4      > GENERATOR_RETURN                                         

End of function dosomething

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
134.93 ms | 1386 KiB | 15 Q