3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string1 = 'aaaaaaaaaaaaaaaaaaaa'; $string2 = 'bbbbbbbbbbbbbbbbbbbb'; $string3 = 'cccccccccccccccccccc'; $string4 = 'dddddddddddddddddddd'; $string5 = 'eeeeeeeeeeeeeeeeeeee'; $time1 = microtime(); for ($k = 0; $k<100.00; $k++) { $concatTest1 = $string1 . $string2 . $string3 . $string4 . $string5; } $time2 = microtime(); $testDuration1 = $time2 - $time1; $time3 = microtime(); for ($m = 0; $m<100.00; $m++) { $concatTest2 = "{$string1}{$string2}{$string3}{$string4}{$string5}"; } $time4 = microtime(); $testDuration2 = $time4 - $time3; $time5 = microtime(); for ($p = 0; $p<100.00; $p++) { $concatTest3 = implode('', array($string1, $string2, $string3, $string4, $string5)); } $time6 = microtime(); $testDuration3 = $time6 - $time5; var_dump( $testDuration1, $testDuration2, $testDuration3 );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
2 jumps found. (Code = 44) Position 1 = 18, Position 2 = 10
Branch analysis from position: 18
1 jumps found. (Code = 42) Position 1 = 35
Branch analysis from position: 35
2 jumps found. (Code = 44) Position 1 = 37, Position 2 = 28
Branch analysis from position: 37
1 jumps found. (Code = 42) Position 1 = 58
Branch analysis from position: 58
2 jumps found. (Code = 44) Position 1 = 60, Position 2 = 47
Branch analysis from position: 60
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 47
2 jumps found. (Code = 44) Position 1 = 60, Position 2 = 47
Branch analysis from position: 60
Branch analysis from position: 47
Branch analysis from position: 28
2 jumps found. (Code = 44) Position 1 = 37, Position 2 = 28
Branch analysis from position: 37
Branch analysis from position: 28
Branch analysis from position: 10
2 jumps found. (Code = 44) Position 1 = 18, Position 2 = 10
Branch analysis from position: 18
Branch analysis from position: 10
filename:       /in/LSvfV
function name:  (null)
number of ops:  71
compiled vars:  !0 = $string1, !1 = $string2, !2 = $string3, !3 = $string4, !4 = $string5, !5 = $time1, !6 = $k, !7 = $concatTest1, !8 = $time2, !9 = $testDuration1, !10 = $time3, !11 = $m, !12 = $concatTest2, !13 = $time4, !14 = $testDuration2, !15 = $time5, !16 = $p, !17 = $concatTest3, !18 = $time6, !19 = $testDuration3
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'aaaaaaaaaaaaaaaaaaaa'
    4     1        ASSIGN                                                   !1, 'bbbbbbbbbbbbbbbbbbbb'
    5     2        ASSIGN                                                   !2, 'cccccccccccccccccccc'
    6     3        ASSIGN                                                   !3, 'dddddddddddddddddddd'
    7     4        ASSIGN                                                   !4, 'eeeeeeeeeeeeeeeeeeee'
   10     5        INIT_FCALL                                               'microtime'
          6        DO_ICALL                                         $25     
          7        ASSIGN                                                   !5, $25
   11     8        ASSIGN                                                   !6, 0
          9      > JMP                                                      ->16
   12    10    >   CONCAT                                           ~28     !0, !1
         11        CONCAT                                           ~29     ~28, !2
         12        CONCAT                                           ~30     ~29, !3
         13        CONCAT                                           ~31     ~30, !4
         14        ASSIGN                                                   !7, ~31
   11    15        PRE_INC                                                  !6
         16    >   IS_SMALLER                                               !6, 100
         17      > JMPNZ                                                    ~34, ->10
   14    18    >   INIT_FCALL                                               'microtime'
         19        DO_ICALL                                         $35     
         20        ASSIGN                                                   !8, $35
   16    21        SUB                                              ~37     !8, !5
         22        ASSIGN                                                   !9, ~37
   18    23        INIT_FCALL                                               'microtime'
         24        DO_ICALL                                         $39     
         25        ASSIGN                                                   !10, $39
   19    26        ASSIGN                                                   !11, 0
         27      > JMP                                                      ->35
   20    28    >   ROPE_INIT                                     5  ~43     !0
         29        ROPE_ADD                                      1  ~43     ~43, !1
         30        ROPE_ADD                                      2  ~43     ~43, !2
         31        ROPE_ADD                                      3  ~43     ~43, !3
         32        ROPE_END                                      4  ~42     ~43, !4
         33        ASSIGN                                                   !12, ~42
   19    34        PRE_INC                                                  !11
         35    >   IS_SMALLER                                               !11, 100
         36      > JMPNZ                                                    ~48, ->28
   22    37    >   INIT_FCALL                                               'microtime'
         38        DO_ICALL                                         $49     
         39        ASSIGN                                                   !13, $49
   24    40        SUB                                              ~51     !13, !10
         41        ASSIGN                                                   !14, ~51
   27    42        INIT_FCALL                                               'microtime'
         43        DO_ICALL                                         $53     
         44        ASSIGN                                                   !15, $53
   28    45        ASSIGN                                                   !16, 0
         46      > JMP                                                      ->58
   29    47    >   INIT_FCALL                                               'implode'
         48        SEND_VAL                                                 ''
         49        INIT_ARRAY                                       ~56     !0
         50        ADD_ARRAY_ELEMENT                                ~56     !1
         51        ADD_ARRAY_ELEMENT                                ~56     !2
         52        ADD_ARRAY_ELEMENT                                ~56     !3
         53        ADD_ARRAY_ELEMENT                                ~56     !4
         54        SEND_VAL                                                 ~56
         55        DO_ICALL                                         $57     
         56        ASSIGN                                                   !17, $57
   28    57        PRE_INC                                                  !16
         58    >   IS_SMALLER                                               !16, 100
         59      > JMPNZ                                                    ~60, ->47
   31    60    >   INIT_FCALL                                               'microtime'
         61        DO_ICALL                                         $61     
         62        ASSIGN                                                   !18, $61
   33    63        SUB                                              ~63     !18, !15
         64        ASSIGN                                                   !19, ~63
   36    65        INIT_FCALL                                               'var_dump'
   37    66        SEND_VAR                                                 !9
   38    67        SEND_VAR                                                 !14
   39    68        SEND_VAR                                                 !19
         69        DO_ICALL                                                 
   40    70      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.43 ms | 1400 KiB | 19 Q