3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php abstract class PageObject { const X = "Don't print this"; public function __construct() { echo static::__CLASS__; } } class Test extends PageObject { const X = "OMG"; } $x = new Test;
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/VfcL7
function name:  (null)
number of ops:  7
compiled vars:  !0 = $x
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   3     0  E >   NOP                                                      
  13     1        NOP                                                      
         2        NOP                                                      
  19     3        NEW                                              $4      :-4
         4        DO_FCALL                                      0          
         5        ASSIGN                                                   !0, $4
         6      > RETURN                                                   1

Class PageObject:
Function __construct:
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/VfcL7
function name:  __construct
number of ops:  4
compiled vars:  none
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   9     0  E >   FETCH_CLASS                                 515  :0      
         1        FETCH_CONSTANT                                   ~1      $0, '__CLASS__'
         2        ECHO                                                     ~1
  10     3      > RETURN                                                   null

End of function __construct

End of class PageObject.

Class Test:
Function __construct:
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/VfcL7
function name:  __construct
number of ops:  4
compiled vars:  none
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   9     0  E >   FETCH_CLASS                                 515  :0      
         1        FETCH_CONSTANT                                   ~1      $0, '__CLASS__'
         2        ECHO                                                     ~1
  10     3      > RETURN                                                   null

End of function __construct

End of class Test.

Generated using Vulcan Logic Dumper, using php 7.3.0