3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Everything you enter here will be executed by our servers. Try it! interface bob { } class A implements bob { public function __construct($ob) { echo $ob->value; } } class B implements bob { private $value = 'unicorns'; } $a = new A(new B());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vFBOi
function name:  (null)
number of ops:  9
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   DECLARE_CLASS                                            'a'
   14     1        DECLARE_CLASS                                            'b'
   18     2        NEW                                              $1      'A'
          3        NEW                                              $2      'B'
          4        DO_FCALL                                      0          
          5        SEND_VAR_NO_REF_EX                                       $2
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !0, $1
          8      > RETURN                                                   1

Class bob: [no user functions]
Class A:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vFBOi
function name:  __construct
number of ops:  4
compiled vars:  !0 = $ob
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
   10     1        FETCH_OBJ_R                                      ~1      !0, 'value'
          2        ECHO                                                     ~1
   11     3      > RETURN                                                   null

End of function __construct

End of class A.

Class B: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.64 ms | 1393 KiB | 13 Q