3v4l.org

run code in 300+ PHP versions simultaneously
<?php $bob = function($x, $y){ return $x + $y; }; $functionReflection = new ReflectionFunction($bob); $parameters = $functionReflection->getParameters(); $aParameter = $parameters[0]; echo $aParameter->getClass()->name;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/72Zlq
function name:  (null)
number of ops:  16
compiled vars:  !0 = $bob, !1 = $functionReflection, !2 = $parameters, !3 = $aParameter
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2F72Zlq%3A3%240'
          1        ASSIGN                                                   !0, ~4
    7     2        NEW                                              $6      'ReflectionFunction'
          3        SEND_VAR_EX                                              !0
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !1, $6
    8     6        INIT_METHOD_CALL                                         !1, 'getParameters'
          7        DO_FCALL                                      0  $9      
          8        ASSIGN                                                   !2, $9
    9     9        FETCH_DIM_R                                      ~11     !2, 0
         10        ASSIGN                                                   !3, ~11
   11    11        INIT_METHOD_CALL                                         !3, 'getClass'
         12        DO_FCALL                                      0  $13     
         13        FETCH_OBJ_R                                      ~14     $13, 'name'
         14        ECHO                                                     ~14
         15      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2F72Zlq%3A3%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/72Zlq
function name:  {closure}
number of ops:  5
compiled vars:  !0 = $x, !1 = $y
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    4     2        ADD                                              ~2      !0, !1
          3      > RETURN                                                   ~2
    5     4*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2F72Zlq%3A3%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.54 ms | 1394 KiB | 13 Q