3v4l.org

run code in 300+ PHP versions simultaneously
<?php function f(string $p1 = 'foo', $p2){ } function test(string $name) { echo new ReflectionFunction($name), "\n"; } echo "--- Test with f() ---\n"; test("f");
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CCXWB
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   ECHO                                                     '---+Test+with+f%28%29+---%0A'
   11     1        INIT_FCALL                                               'test'
          2        SEND_VAL                                                 'f'
          3        DO_FCALL                                      0          
          4      > RETURN                                                   1

Function f:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CCXWB
function name:  f
number of ops:  3
compiled vars:  !0 = $p1, !1 = $p2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    4     2      > RETURN                                                   null

End of function f

Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CCXWB
function name:  test
number of ops:  7
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
    7     1        NEW                                              $1      'ReflectionFunction'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0          
          4        ECHO                                                     $1
          5        ECHO                                                     '%0A'
    8     6      > RETURN                                                   null

End of function test

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
189.22 ms | 1002 KiB | 14 Q