3v4l.org

run code in 300+ PHP versions simultaneously
<?php function foo($param1, $param2 = 'hello', $param3 = 'world') { echo $param1 . ' ' . $param2 . ' ' . $param3; } $parameters = array( 0 => 'Say', 2 => 'John', ); $reflection = new ReflectionFunction('foo'); $reflection->invokeArgs($parameters);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5QjVk
function name:  (null)
number of ops:  9
compiled vars:  !0 = $parameters, !1 = $reflection
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   ASSIGN                                                   !0, <array>
   12     1        NEW                                              $3      'ReflectionFunction'
          2        SEND_VAL_EX                                              'foo'
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !1, $3
   13     5        INIT_METHOD_CALL                                         !1, 'invokeArgs'
          6        SEND_VAR_EX                                              !0
          7        DO_FCALL                                      0          
          8      > RETURN                                                   1

Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5QjVk
function name:  foo
number of ops:  9
compiled vars:  !0 = $param1, !1 = $param2, !2 = $param3
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV_INIT                                        !1      'hello'
          2        RECV_INIT                                        !2      'world'
    4     3        CONCAT                                           ~3      !0, '+'
          4        CONCAT                                           ~4      ~3, !1
          5        CONCAT                                           ~5      ~4, '+'
          6        CONCAT                                           ~6      ~5, !2
          7        ECHO                                                     ~6
    5     8      > RETURN                                                   null

End of function foo

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.09 ms | 1393 KiB | 13 Q