3v4l.org

run code in 500+ PHP versions simultaneously
<?php namespace SomeNamespace; abstract class DictionaryKeepAliveIncrements{ CONST second = 1; CONST quarterminute = 15; CONST halfminute = 30; CONST minute = 60; } class A { public function getConst($name) { return constant('SomeNamespace\DictionaryKeepAliveIncrements::'.$name); } public function doSomething() { echo $this->getConst('minute'); } } $a = new A; $a->doSomething();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6WYgY
function name:  (null)
number of ops:  6
compiled vars:  !0 = $a
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   26     0  E >   NEW                                                  $1      'SomeNamespace%5CA'
          1        DO_FCALL                                          0          
          2        ASSIGN                                                       !0, $1
   27     3        INIT_METHOD_CALL                                             !0, 'doSomething'
          4        DO_FCALL                                          0          
          5      > RETURN                                                       1

Class SomeNamespace\DictionaryKeepAliveIncrements: [no user functions]
Class SomeNamespace\A:
Function getconst:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6WYgY
function name:  getConst
number of ops:  7
compiled vars:  !0 = $name
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   17     0  E >   RECV                                                 !0      
   18     1        INIT_NS_FCALL_BY_NAME                                        'SomeNamespace%5Cconstant'
          2        CONCAT                                               ~1      'SomeNamespace%5CDictionaryKeepAliveIncrements%3A%3A', !0
          3        SEND_VAL_EX                                                  ~1
          4        DO_FCALL                                          0  $2      
          5      > RETURN                                                       $2
   19     6*     > RETURN                                                       null

End of function getconst

Function dosomething:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6WYgY
function name:  doSomething
number of ops:  5
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   22     0  E >   INIT_METHOD_CALL                                             'getConst'
          1        SEND_VAL_EX                                                  'minute'
          2        DO_FCALL                                          0  $0      
          3        ECHO                                                         $0
   23     4      > RETURN                                                       null

End of function dosomething

End of class SomeNamespace\A.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
1324.24 ms | 3009 KiB | 15 Q