3v4l.org

run code in 300+ PHP versions simultaneously
<?php abstract class Abs { const PREFIX = 'Abstract'; } class Concrete extends Abs { const PREFIX = 'Concrete'; public function getPrefix() { echo "self: " . self::PREFIX . "\n"; echo "static: " . static::PREFIX . "\n"; } } $concrete = new Concrete(); $concrete->getPrefix();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/dEt7L
function name:  (null)
number of ops:  6
compiled vars:  !0 = $concrete
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   22     0  E >   NEW                                              $1      'Concrete'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   23     3        INIT_METHOD_CALL                                         !0, 'getPrefix'
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

Class Abs: [no user functions]
Class Concrete:
Function getprefix:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/dEt7L
function name:  getPrefix
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   ECHO                                                     'self%3A+Concrete%0A'
   17     1        FETCH_CLASS_CONSTANT                             ~0      'PREFIX'
          2        CONCAT                                           ~1      'static%3A+', ~0
          3        CONCAT                                           ~2      ~1, '%0A'
          4        ECHO                                                     ~2
   18     5      > RETURN                                                   null

End of function getprefix

End of class Concrete.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.57 ms | 1393 KiB | 13 Q