3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace { define('SOME_CONSTANT', 1); } namespace Some\Name\Space { use ReflectionFunction; $reflection = new ReflectionFunction(function ($const = \PHP_EOL, $const2 = \SOME_CONSTANT) { }); echo $reflection->getParameters()[0]->getDefaultValueConstantName() . PHP_EOL; echo $reflection->getParameters()[1]->getDefaultValue() . PHP_EOL; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/t149E
function name:  (null)
number of ops:  26
compiled vars:  !0 = $reflection
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   5     0  E >   INIT_FCALL                                               'define'
         1        SEND_VAL                                                 'SOME_CONSTANT'
         2        SEND_VAL                                                 1
         3        DO_ICALL                                                 
  12     4        NEW                                              $2      :42
         5        RAISE_ABSTRACT_ERROR                             ~3      '%00some%5Cname%5Cspace%5C%7Bclosure%7D%2Fin%2Ft149E0x7fab8647a0d7'
  13     6        SEND_VAL_EX                                              ~3
         7        DO_FCALL                                      0          
         8        QM_ASSIGN                                                !0
  14     9        INIT_METHOD_CALL                                         !0, 'getParameters'
        10        DO_FCALL                                      0  $6      
        11        FETCH_DIM_R                                      ~7      $6, 0
        12        INIT_METHOD_CALL                                         ~7, 'getDefaultValueConstantName'
        13        DO_FCALL                                      0  $8      
        14        FETCH_CONSTANT                                   ~9      'Some%5CName%5CSpace%5CPHP_EOL'
        15        CONCAT                                           ~10     $8, ~9
        16        ASSIGN_OBJ                                               ~10
  15    17        INIT_METHOD_CALL                                         !0, 'getParameters'
        18        DO_FCALL                                      0  $11     
        19        FETCH_DIM_R                                      ~12     $11, 1
        20        INIT_METHOD_CALL                                         ~12, 'getDefaultValue'
        21        DO_FCALL                                      0  $13     
        22        FETCH_CONSTANT                                   ~14     'Some%5CName%5CSpace%5CPHP_EOL'
        23        CONCAT                                           ~15     $13, ~14
        24        ASSIGN_OBJ                                               ~15
  16    25      > RETURN                                                   1

Function %00some%5Cname%5Cspace%5C%7Bclosure%7D%2Fin%2Ft149E0x7fab8647a0d7:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/t149E
function name:  Some\Name\Space\{closure}
number of ops:  3
compiled vars:  !0 = $const, !1 = $const2
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  12     0  E >   RECV_INIT                                        !0      <const ast>
         1        RECV_INIT                                        !1      <const ast>
  13     2      > RETURN                                                   null

End of function %00some%5Cname%5Cspace%5C%7Bclosure%7D%2Fin%2Ft149E0x7fab8647a0d7

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
34.27 ms | 412 KiB | 7 Q