3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Everything you enter here will be executed by our servers. Try it! class Image { public $a="s"; }; class Headed extends Image { }; class Dimension { function __construct(Image $image) { var_dump($image); } }; $h = new Headed; $d = new Dimension($h);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/XWHLA
function name:  (null)
number of ops:  8
compiled vars:  !0 = $h, !1 = $d
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   NEW                                              $2      'Headed'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   17     3        NEW                                              $5      'Dimension'
          4        SEND_VAR_EX                                              !0
          5        DO_FCALL                                      0          
          6        ASSIGN                                                   !1, $5
          7      > RETURN                                                   1

Class Image: [no user functions]
Class Headed: [no user functions]
Class Dimension:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/XWHLA
function name:  __construct
number of ops:  5
compiled vars:  !0 = $image
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV                                             !0      
   12     1        INIT_FCALL                                               'var_dump'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                                 
   13     4      > RETURN                                                   null

End of function __construct

End of class Dimension.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.04 ms | 1394 KiB | 15 Q