3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Container {} interface RuleSetInterface {} class RuleSet implements RuleSetInterface {} class Foo { public function __construct(Container $app, RuleSetInterface $rules) { $this->app = $app; var_dump(is_null($rules)); var_dump($rules instanceof RuleSetInterface); exit(); $this->rules = $rules; } } $foo = new Foo(new Container());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vaqqK
function name:  (null)
number of ops:  8
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   DECLARE_CLASS                                            'ruleset'
   22     1        NEW                                              $1      'Foo'
          2        NEW                                              $2      'Container'
          3        DO_FCALL                                      0          
          4        SEND_VAR_NO_REF_EX                                       $2
          5        DO_FCALL                                      0          
          6        ASSIGN                                                   !0, $1
          7      > RETURN                                                   1

Class Container: [no user functions]
Class RuleSetInterface: [no user functions]
Class RuleSet: [no user functions]
Class Foo:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 79) Position 1 = -2
filename:       /in/vaqqK
function name:  __construct
number of ops:  16
compiled vars:  !0 = $app, !1 = $rules
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   14     2        ASSIGN_OBJ                                               'app'
          3        OP_DATA                                                  !0
   15     4        INIT_FCALL                                               'var_dump'
          5        TYPE_CHECK                                    2  ~3      !1
          6        SEND_VAL                                                 ~3
          7        DO_ICALL                                                 
   16     8        INIT_FCALL                                               'var_dump'
          9        INSTANCEOF                                       ~5      !1, 'RuleSetInterface'
         10        SEND_VAL                                                 ~5
         11        DO_ICALL                                                 
   17    12      > EXIT                                                     
   18    13*       ASSIGN_OBJ                                               'rules'
         14*       OP_DATA                                                  !1
   19    15*     > RETURN                                                   null

End of function __construct

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.93 ms | 1395 KiB | 15 Q