3v4l.org

run code in 300+ PHP versions simultaneously
<?php // // MyClass // Created by Thijs van den Anker on 20/04/15. class MyClass { public function __construct(Foo $a) { die('in'); print($a->$baz); } } class Foo { public $baz = 'jada'; } class Bar { public $baz = 'dadeee'; } $foo = new Foo; $bar = new Bar; $a = new MyClass($foo); $class = new ReflectionClass('MyClass'); $instance = $class->newInstanceArgs(array('substr')); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8u6ZU
function name:  (null)
number of ops:  19
compiled vars:  !0 = $foo, !1 = $bar, !2 = $a, !3 = $class, !4 = $instance
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   NEW                                              $5      'Foo'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $5
   21     3        NEW                                              $8      'Bar'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !1, $8
   22     6        NEW                                              $11     'MyClass'
          7        SEND_VAR_EX                                              !0
          8        DO_FCALL                                      0          
          9        ASSIGN                                                   !2, $11
   24    10        NEW                                              $14     'ReflectionClass'
         11        SEND_VAL_EX                                              'MyClass'
         12        DO_FCALL                                      0          
         13        ASSIGN                                                   !3, $14
   25    14        INIT_METHOD_CALL                                         !3, 'newInstanceArgs'
         15        SEND_VAL_EX                                              <array>
         16        DO_FCALL                                      0  $17     
         17        ASSIGN                                                   !4, $17
   27    18      > RETURN                                                   1

Class MyClass:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 79) Position 1 = -2
filename:       /in/8u6ZU
function name:  __construct
number of ops:  5
compiled vars:  !0 = $a, !1 = $baz
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
    7     1      > EXIT                                                     'in'
    8     2*       FETCH_OBJ_R                                      ~2      !0, !1
          3*       ECHO                                                     ~2
    9     4*     > RETURN                                                   null

End of function __construct

End of class MyClass.

Class Foo: [no user functions]
Class Bar: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.52 ms | 1385 KiB | 13 Q