3v4l.org

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

Class Foo:
Function thing:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/squAE
function name:  thing
number of ops:  2
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1      > RETURN                                                   null

End of function thing

End of class Foo.

Class Bar:
Function thing:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/squAE
function name:  thing
number of ops:  3
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
    7     1        PRE_INC                                                  !0
    8     2      > RETURN                                                   null

End of function thing

End of class Bar.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.01 ms | 1387 KiB | 15 Q