3v4l.org

run code in 300+ PHP versions simultaneously
<?php class ExampleClass { public function exampleMethod( $exampleArg1, $exampleArg2 ){ // do something here echo "Argument 1: {$exampleArg1}\n"; echo "Argument 2: {$exampleArg2}\n"; } } $array = [ 'exampleArg1Value', 'exampleArg2Value' ]; echo PHP_VERSION, "\n"; $call = new \ReflectionMethod( "ExampleClass", "exampleMethod" ); $call->invokeArgs( new ExampleClass(), ["argument1", "argument2"] ); var_dump( $call );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/X4V5N
function name:  (null)
number of ops:  18
compiled vars:  !0 = $array, !1 = $call
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   ASSIGN                                                   !0, <array>
   13     1        ECHO                                                     '8.0.0'
          2        ECHO                                                     '%0A'
   15     3        NEW                                              $3      'ReflectionMethod'
          4        SEND_VAL_EX                                              'ExampleClass'
          5        SEND_VAL_EX                                              'exampleMethod'
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !1, $3
   16     8        INIT_METHOD_CALL                                         !1, 'invokeArgs'
          9        NEW                                              $6      'ExampleClass'
         10        DO_FCALL                                      0          
         11        SEND_VAR_NO_REF_EX                                       $6
         12        SEND_VAL_EX                                              <array>
         13        DO_FCALL                                      0          
   17    14        INIT_FCALL                                               'var_dump'
         15        SEND_VAR                                                 !1
         16        DO_ICALL                                                 
         17      > RETURN                                                   1

Class ExampleClass:
Function examplemethod:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/X4V5N
function name:  exampleMethod
number of ops:  11
compiled vars:  !0 = $exampleArg1, !1 = $exampleArg2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    6     2        ROPE_INIT                                     3  ~3      'Argument+1%3A+'
          3        ROPE_ADD                                      1  ~3      ~3, !0
          4        ROPE_END                                      2  ~2      ~3, '%0A'
          5        ECHO                                                     ~2
    7     6        ROPE_INIT                                     3  ~6      'Argument+2%3A+'
          7        ROPE_ADD                                      1  ~6      ~6, !1
          8        ROPE_END                                      2  ~5      ~6, '%0A'
          9        ECHO                                                     ~5
    8    10      > RETURN                                                   null

End of function examplemethod

End of class ExampleClass.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.01 ms | 1396 KiB | 15 Q