3v4l.org

run code in 300+ PHP versions simultaneously
<?php final class valueobject { static $p = "some property"; private $prop; function __construct() { $this->prop = valueobject::$p; } function getProp(){ return $this->prop; } } $vo = new valueobject; var_dump($vo); echo $vo->getProp(),"\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/u9aBt
function name:  (null)
number of ops:  11
compiled vars:  !0 = $vo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   NEW                                              $1      'valueobject'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   15     3        INIT_FCALL                                               'var_dump'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                                 
   16     6        INIT_METHOD_CALL                                         !0, 'getProp'
          7        DO_FCALL                                      0  $5      
          8        ECHO                                                     $5
          9        ECHO                                                     '%0A'
         10      > RETURN                                                   1

Class valueobject:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/u9aBt
function name:  __construct
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   FETCH_STATIC_PROP_R          unknown             ~1      'p'
          1        ASSIGN_OBJ                                               'prop'
          2        OP_DATA                                                  ~1
    8     3      > RETURN                                                   null

End of function __construct

Function getprop:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/u9aBt
function name:  getProp
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   FETCH_OBJ_R                                      ~0      'prop'
          1      > RETURN                                                   ~0
   12     2*     > RETURN                                                   null

End of function getprop

End of class valueobject.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.77 ms | 1399 KiB | 16 Q