3v4l.org

run code in 300+ PHP versions simultaneously
<?php function callMe(...$args) {} function callMe2($args) {} $before = memory_get_usage(); $start = microtime(TRUE); for($i=0;$i<10000;$i++) { callMe(1,2,3,4,5); } echo 'callMe: '.(microtime(TRUE)-$start).' ('.(memory_get_usage()-$before).")\n"; $before = memory_get_usage(); $start = microtime(TRUE); for($i=0;$i<10000;$i++) { callMe(...array(1,2,3,4,5)); } echo 'callMe...: '.(microtime(TRUE)-$start).' ('.(memory_get_usage()-$before).")\n"; $before = memory_get_usage(); $start = microtime(TRUE); for($i=0;$i<10000;$i++) { callMe2(array(1,2,3,4,5)); } echo 'callMe2: '.(microtime(TRUE)-$start).' ('.(memory_get_usage()-$before).")\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
2 jumps found. (Code = 44) Position 1 = 19, Position 2 = 9
Branch analysis from position: 19
1 jumps found. (Code = 42) Position 1 = 45
Branch analysis from position: 45
2 jumps found. (Code = 44) Position 1 = 47, Position 2 = 40
Branch analysis from position: 47
1 jumps found. (Code = 42) Position 1 = 72
Branch analysis from position: 72
2 jumps found. (Code = 44) Position 1 = 74, Position 2 = 68
Branch analysis from position: 74
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 68
2 jumps found. (Code = 44) Position 1 = 74, Position 2 = 68
Branch analysis from position: 74
Branch analysis from position: 68
Branch analysis from position: 40
2 jumps found. (Code = 44) Position 1 = 47, Position 2 = 40
Branch analysis from position: 47
Branch analysis from position: 40
Branch analysis from position: 9
2 jumps found. (Code = 44) Position 1 = 19, Position 2 = 9
Branch analysis from position: 19
Branch analysis from position: 9
filename:       /in/HILqT
function name:  (null)
number of ops:  87
compiled vars:  !0 = $before, !1 = $start, !2 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   INIT_FCALL                                               'memory_get_usage'
          1        DO_ICALL                                         $3      
          2        ASSIGN                                                   !0, $3
    7     3        INIT_FCALL                                               'microtime'
          4        SEND_VAL                                                 <true>
          5        DO_ICALL                                         $5      
          6        ASSIGN                                                   !1, $5
    8     7        ASSIGN                                                   !2, 0
          8      > JMP                                                      ->17
    9     9    >   INIT_FCALL                                               'callme'
         10        SEND_VAL                                                 1
         11        SEND_VAL                                                 2
         12        SEND_VAL                                                 3
         13        SEND_VAL                                                 4
         14        SEND_VAL                                                 5
         15        DO_FCALL                                      0          
    8    16        PRE_INC                                                  !2
         17    >   IS_SMALLER                                               !2, 10000
         18      > JMPNZ                                                    ~10, ->9
   11    19    >   INIT_FCALL                                               'microtime'
         20        SEND_VAL                                                 <true>
         21        DO_ICALL                                         $11     
         22        SUB                                              ~12     $11, !1
         23        CONCAT                                           ~13     'callMe%3A+', ~12
         24        CONCAT                                           ~14     ~13, '+%28'
         25        INIT_FCALL                                               'memory_get_usage'
         26        DO_ICALL                                         $15     
         27        SUB                                              ~16     $15, !0
         28        CONCAT                                           ~17     ~14, ~16
         29        CONCAT                                           ~18     ~17, '%29%0A'
         30        ECHO                                                     ~18
   13    31        INIT_FCALL                                               'memory_get_usage'
         32        DO_ICALL                                         $19     
         33        ASSIGN                                                   !0, $19
   14    34        INIT_FCALL                                               'microtime'
         35        SEND_VAL                                                 <true>
         36        DO_ICALL                                         $21     
         37        ASSIGN                                                   !1, $21
   15    38        ASSIGN                                                   !2, 0
         39      > JMP                                                      ->45
   16    40    >   INIT_FCALL                                               'callme'
         41        SEND_UNPACK                                              <array>
         42        CHECK_UNDEF_ARGS                                         
         43        DO_FCALL                                      1          
   15    44        PRE_INC                                                  !2
         45    >   IS_SMALLER                                               !2, 10000
         46      > JMPNZ                                                    ~26, ->40
   18    47    >   INIT_FCALL                                               'microtime'
         48        SEND_VAL                                                 <true>
         49        DO_ICALL                                         $27     
         50        SUB                                              ~28     $27, !1
         51        CONCAT                                           ~29     'callMe...%3A+', ~28
         52        CONCAT                                           ~30     ~29, '+%28'
         53        INIT_FCALL                                               'memory_get_usage'
         54        DO_ICALL                                         $31     
         55        SUB                                              ~32     $31, !0
         56        CONCAT                                           ~33     ~30, ~32
         57        CONCAT                                           ~34     ~33, '%29%0A'
         58        ECHO                                                     ~34
   20    59        INIT_FCALL                                               'memory_get_usage'
         60        DO_ICALL                                         $35     
         61        ASSIGN                                                   !0, $35
   21    62        INIT_FCALL                                               'microtime'
         63        SEND_VAL                                                 <true>
         64        DO_ICALL                                         $37     
         65        ASSIGN                                                   !1, $37
   22    66        ASSIGN                                                   !2, 0
         67      > JMP                                                      ->72
   23    68    >   INIT_FCALL                                               'callme2'
         69        SEND_VAL                                                 <array>
         70        DO_FCALL                                      0          
   22    71        PRE_INC                                                  !2
         72    >   IS_SMALLER                                               !2, 10000
         73      > JMPNZ                                                    ~42, ->68
   25    74    >   INIT_FCALL                                               'microtime'
         75        SEND_VAL                                                 <true>
         76        DO_ICALL                                         $43     
         77        SUB                                              ~44     $43, !1
         78        CONCAT                                           ~45     'callMe2%3A+', ~44
         79        CONCAT                                           ~46     ~45, '+%28'
         80        INIT_FCALL                                               'memory_get_usage'
         81        DO_ICALL                                         $47     
         82        SUB                                              ~48     $47, !0
         83        CONCAT                                           ~49     ~46, ~48
         84        CONCAT                                           ~50     ~49, '%29%0A'
         85        ECHO                                                     ~50
         86      > RETURN                                                   1

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

End of function callme

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

End of function callme2

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.32 ms | 1406 KiB | 20 Q