3v4l.org

run code in 300+ PHP versions simultaneously
<?php abstract class Abs { const PREFIX = 'Abstract'; } class Concrete extends Abs { 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/MhDJo
function name:  (null)
number of ops:  6
compiled vars:  !0 = $concrete
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   NEW                                              $1      'Concrete'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   20     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/MhDJo
function name:  getPrefix
number of ops:  9
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   FETCH_CLASS_CONSTANT                             ~0      'PREFIX'
          1        CONCAT                                           ~1      'self%3A+', ~0
          2        CONCAT                                           ~2      ~1, '%0A'
          3        ECHO                                                     ~2
   14     4        FETCH_CLASS_CONSTANT                             ~3      'PREFIX'
          5        CONCAT                                           ~4      'static%3A+', ~3
          6        CONCAT                                           ~5      ~4, '%0A'
          7        ECHO                                                     ~5
   15     8      > RETURN                                                   null

End of function getprefix

End of class Concrete.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.57 ms | 1394 KiB | 13 Q