3v4l.org

run code in 300+ PHP versions simultaneously
<?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());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/25OO3
function name:  (null)
number of ops:  14
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      ~1, 32767
          3        SEND_VAL                                                 ~2
          4        DO_ICALL                                                 
   17     5        NEW                                              $4      'Bar'
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !0, $4
   19     8        INIT_FCALL                                               'var_dump'
          9        INIT_METHOD_CALL                                         !0, 'showFoo'
         10        DO_FCALL                                      0  $7      
         11        SEND_VAR                                                 $7
         12        DO_ICALL                                                 
         13      > RETURN                                                   1

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

End of function showfoo

End of class Bar.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.58 ms | 1395 KiB | 17 Q