3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { protected static $dbname = DBNAME; public static function debug() { return Foo::$dbname; } } $appdata = array( 'id' => 31416, ); define('DBNAME', 'mydb_'.$_ENV['PATH']); var_dump(Foo::debug());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6NLqC
function name:  (null)
number of ops:  14
compiled vars:  !0 = $appdata
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   ASSIGN                                                   !0, <array>
   14     1        INIT_FCALL                                               'define'
          2        SEND_VAL                                                 'DBNAME'
          3        FETCH_R                      global              ~2      '_ENV'
          4        FETCH_DIM_R                                      ~3      ~2, 'PATH'
          5        CONCAT                                           ~4      'mydb_', ~3
          6        SEND_VAL                                                 ~4
          7        DO_ICALL                                                 
   15     8        INIT_FCALL                                               'var_dump'
          9        INIT_STATIC_METHOD_CALL                                  'Foo', 'debug'
         10        DO_FCALL                                      0  $6      
         11        SEND_VAR                                                 $6
         12        DO_ICALL                                                 
         13      > RETURN                                                   1

Class Foo:
Function debug:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6NLqC
function name:  debug
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   FETCH_STATIC_PROP_R          unknown             ~0      'dbname'
          1      > RETURN                                                   ~0
    8     2*     > RETURN                                                   null

End of function debug

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
142.89 ms | 1395 KiB | 17 Q