3v4l.org

run code in 500+ PHP versions simultaneously
<?php class x { private $p = ' in X'; public function foo() { return $this->p . ' ' . static::$p; } } class y extends x { function __construct() {} public static $p = ' in Y'; } $y = new y; echo $y->foo();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Bpfge
function name:  (null)
number of ops:  7
compiled vars:  !0 = $y
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   17     0  E >   NEW                                                  $1      'y'
          1        DO_FCALL                                          0          
          2        ASSIGN                                                       !0, $1
   18     3        INIT_METHOD_CALL                                             !0, 'foo'
          4        DO_FCALL                                          0  $4      
          5        ECHO                                                         $4
          6      > RETURN                                                       1

Class x:
Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Bpfge
function name:  foo
number of ops:  6
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    7     0  E >   FETCH_OBJ_R                                          ~0      'p'
          1        CONCAT                                               ~1      ~0, '+'
          2        FETCH_STATIC_PROP_R              unknown             ~2      'p'
          3        CONCAT                                               ~3      ~1, ~2
          4      > RETURN                                                       ~3
    8     5*     > RETURN                                                       null

End of function foo

End of class x.

Class y:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Bpfge
function name:  __construct
number of ops:  1
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   12     0  E > > RETURN                                                       null

End of function __construct

Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Bpfge
function name:  foo
number of ops:  6
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    7     0  E >   FETCH_OBJ_R                                          ~0      'p'
          1        CONCAT                                               ~1      ~0, '+'
          2        FETCH_STATIC_PROP_R              unknown             ~2      'p'
          3        CONCAT                                               ~3      ~1, ~2
          4      > RETURN                                                       ~3
    8     5*     > RETURN                                                       null

End of function foo

End of class y.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
127.45 ms | 477 KiB | 7 Q