3v4l.org

run code in 300+ PHP versions simultaneously
<?php function test($a, $b, $c) { } $params = array(1,2,3); $t = microtime(true); for($i=0; $i<100000000; $i++) call_user_func_array('test', $params); printf("call_user_func: %.6f\n",microtime(true)-$t); $t = microtime(true); for($i=0; $i<100000000; $i++) test(...$params); printf("splat operator: %.6f\n",microtime(true)-$t);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
2 jumps found. (Code = 44) Position 1 = 14, Position 2 = 7
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 33
Branch analysis from position: 33
2 jumps found. (Code = 44) Position 1 = 35, Position 2 = 28
Branch analysis from position: 35
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 28
2 jumps found. (Code = 44) Position 1 = 35, Position 2 = 28
Branch analysis from position: 35
Branch analysis from position: 28
Branch analysis from position: 7
2 jumps found. (Code = 44) Position 1 = 14, Position 2 = 7
Branch analysis from position: 14
Branch analysis from position: 7
filename:       /in/uEVgj
function name:  (null)
number of ops:  44
compiled vars:  !0 = $params, !1 = $t, !2 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   ASSIGN                                                   !0, <array>
    9     1        INIT_FCALL                                               'microtime'
          2        SEND_VAL                                                 <true>
          3        DO_ICALL                                         $4      
          4        ASSIGN                                                   !1, $4
   10     5        ASSIGN                                                   !2, 0
          6      > JMP                                                      ->12
   11     7    >   INIT_FCALL                                               'test'
          8        SEND_ARRAY                                               !0
          9        CHECK_UNDEF_ARGS                                         
         10        DO_FCALL                                      0          
   10    11        PRE_INC                                                  !2
         12    >   IS_SMALLER                                               !2, 100000000
         13      > JMPNZ                                                    ~9, ->7
   12    14    >   INIT_FCALL                                               'printf'
         15        SEND_VAL                                                 'call_user_func%3A+%25.6f%0A'
         16        INIT_FCALL                                               'microtime'
         17        SEND_VAL                                                 <true>
         18        DO_ICALL                                         $10     
         19        SUB                                              ~11     $10, !1
         20        SEND_VAL                                                 ~11
         21        DO_ICALL                                                 
   15    22        INIT_FCALL                                               'microtime'
         23        SEND_VAL                                                 <true>
         24        DO_ICALL                                         $13     
         25        ASSIGN                                                   !1, $13
   16    26        ASSIGN                                                   !2, 0
         27      > JMP                                                      ->33
   17    28    >   INIT_FCALL                                               'test'
         29        SEND_UNPACK                                              !0
         30        CHECK_UNDEF_ARGS                                         
         31        DO_FCALL                                      1          
   16    32        PRE_INC                                                  !2
         33    >   IS_SMALLER                                               !2, 100000000
         34      > JMPNZ                                                    ~18, ->28
   18    35    >   INIT_FCALL                                               'printf'
         36        SEND_VAL                                                 'splat+operator%3A+%25.6f%0A'
         37        INIT_FCALL                                               'microtime'
         38        SEND_VAL                                                 <true>
         39        DO_ICALL                                         $19     
         40        SUB                                              ~20     $19, !1
         41        SEND_VAL                                                 ~20
         42        DO_ICALL                                                 
         43      > RETURN                                                   1

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

End of function test

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.16 ms | 1403 KiB | 19 Q