3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface testInterface { public function doAction(); } class Foo implements testInterface { public function doAction() { echo "Action!"; } } class Bar { protected $test = "test"; } class Baz { public function __construct(testInterface $class) { echo "Everything's ok!"; } } $foo = new Foo(); $bar = new Bar(); $baz = new Baz($foo);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9HmDZ
function name:  (null)
number of ops:  12
compiled vars:  !0 = $foo, !1 = $bar, !2 = $baz
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   DECLARE_CLASS                                            'foo'
   29     1        NEW                                              $3      'Foo'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $3
   30     4        NEW                                              $6      'Bar'
          5        DO_FCALL                                      0          
          6        ASSIGN                                                   !1, $6
   31     7        NEW                                              $9      'Baz'
          8        SEND_VAR_EX                                              !0
          9        DO_FCALL                                      0          
         10        ASSIGN                                                   !2, $9
         11      > RETURN                                                   1

Class testInterface:
Function doaction:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9HmDZ
function name:  doAction
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E > > RETURN                                                   null

End of function doaction

End of class testInterface.

Class Foo:
Function doaction:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9HmDZ
function name:  doAction
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   ECHO                                                     'Action%21'
   13     1      > RETURN                                                   null

End of function doaction

End of class Foo.

Class Bar: [no user functions]
Class Baz:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9HmDZ
function name:  __construct
number of ops:  3
compiled vars:  !0 = $class
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   23     0  E >   RECV                                             !0      
   25     1        ECHO                                                     'Everything%27s+ok%21'
   26     2      > RETURN                                                   null

End of function __construct

End of class Baz.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
173.37 ms | 1395 KiB | 13 Q