3v4l.org

run code in 300+ PHP versions simultaneously
<?php function foo() { return 'hello world'; } $rf = new ReflectionFunction('foo'); $func = $rf->getClosure(); echo $func();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/r9ANR
function name:  (null)
number of ops:  11
compiled vars:  !0 = $rf, !1 = $func
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   NEW                                              $2      'ReflectionFunction'
          1        SEND_VAL_EX                                              'foo'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $2
    8     4        INIT_METHOD_CALL                                         !0, 'getClosure'
          5        DO_FCALL                                      0  $5      
          6        ASSIGN                                                   !1, $5
    9     7        INIT_DYNAMIC_CALL                                        !1
          8        DO_FCALL                                      0  $7      
          9        ECHO                                                     $7
         10      > RETURN                                                   1

Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/r9ANR
function name:  foo
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E > > RETURN                                                   'hello+world'
    5     1*     > RETURN                                                   null

End of function foo

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
175.55 ms | 1393 KiB | 13 Q