3v4l.org

run code in 500+ PHP versions simultaneously
<?php namespace Foo{ const TEST = 'asdf'; abstract class Foo { abstract public function addStamp($positionOrConfig = TEST); } } namespace Test { var_dump((new \ReflectionMethod(\Foo\Foo::class, 'addStamp'))->getParameters()[0]->getDefaultValueConstantName()); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/FqgbV
function name:  (null)
number of ops:  14
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    5     0  E >   DECLARE_CONST                                                'Foo%5CTEST', 'asdf'
   13     1        INIT_NS_FCALL_BY_NAME                                        'Test%5Cvar_dump'
          2        NEW                                                  $0      'ReflectionMethod'
          3        SEND_VAL_EX                                                  'Foo%5CFoo'
          4        SEND_VAL_EX                                                  'addStamp'
          5        DO_FCALL                                          0          
          6        INIT_METHOD_CALL                                             $0, 'getParameters'
          7        DO_FCALL                                          0  $2      
          8        FETCH_DIM_R                                          ~3      $2, 0
          9        INIT_METHOD_CALL                                             ~3, 'getDefaultValueConstantName'
         10        DO_FCALL                                          0  $4      
         11        SEND_VAR_NO_REF_EX                                           $4
         12        DO_FCALL                                          0          
   14    13      > RETURN                                                       1

Class Foo\Foo:
Function addstamp:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/FqgbV
function name:  addStamp
number of ops:  2
compiled vars:  !0 = $positionOrConfig
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    8     0  E >   RECV_INIT                                            !0      <const ast>
          1      > RETURN                                                       null

End of function addstamp

End of class Foo\Foo.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
219.79 ms | 2299 KiB | 14 Q