3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php error_reporting(E_ALL|E_SRTICT); class Foo { const FOO = 'foo'; } class Bar extends Foo { function showFoo() { return self::FOO; } } $bar = new Bar(); var_dump($bar->showFoo());
based on qh86H
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/25OO3
function name:  (null)
number of ops:  17
compiled vars:  !0 = $bar
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   3     0  E >   INIT_FCALL                                               'error_reporting'
         1        FETCH_CONSTANT                                   ~1      'E_SRTICT'
         2        BW_OR                                            ~2      32767, ~1
         3        SEND_VAL                                                 ~2
         4        DO_ICALL                                                 
   5     5        NOP                                                      
  10     6        NOP                                                      
         7        NOP                                                      
  17     8        NEW                                              $7      :1
         9        DO_FCALL                                      0          
        10        ASSIGN                                                   !0, $7
  19    11        INIT_FCALL                                               'var_dump'
        12        INIT_METHOD_CALL                                         !0, 'showFoo'
        13        DO_FCALL                                      0  $10     
        14        SEND_VAR                                                 $10
        15        DO_ICALL                                                 
        16      > RETURN                                                   1

Class Foo: [no user functions]
Class Bar:
Function showfoo:
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/25OO3
function name:  showFoo
number of ops:  4
compiled vars:  none
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  13     0  E >   FETCH_CLASS                                 513  :0      
         1        FETCH_CONSTANT                                   ~1      $0, 'FOO'
         2      > RETURN                                                   ~1
  14     3*     > RETURN                                                   null

End of function showfoo

End of class Bar.

Generated using Vulcan Logic Dumper, using php 7.3.0