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]->getDefaultValueConstantName() . PHP_EOL; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WqdX9
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      'ReflectionFunction'
          5        DECLARE_LAMBDA_FUNCTION                                  '%00some%5Cname%5Cspace%5C%7Bclosure%7D%2Fin%2FWqdX9%3A12%240'
   13     6        SEND_VAL_EX                                              ~3
          7        DO_FCALL                                      0          
   12     8        ASSIGN                                                   !0, $2
   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        ECHO                                                     ~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, 'getDefaultValueConstantName'
         21        DO_FCALL                                      0  $13     
         22        FETCH_CONSTANT                                   ~14     'Some%5CName%5CSpace%5CPHP_EOL'
         23        CONCAT                                           ~15     $13, ~14
         24        ECHO                                                     ~15
   16    25      > RETURN                                                   1

Function %00some%5Cname%5Cspace%5C%7Bclosure%7D%2Fin%2FWqdX9%3A12%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WqdX9
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%2FWqdX9%3A12%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
174.08 ms | 1396 KiB | 15 Q