3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string1 = 'aaaaaaaaaaaaaaaaaaaa'; $string2 = 'bbbbbbbbbbbbbbbbbbbb'; $string3 = 'cccccccccccccccccccc'; $string4 = 'dddddddddddddddddddd'; $string5 = 'eeeeeeeeeeeeeeeeeeee'; $results = array(); $time1 = microtime(true); for ($i = 0; $i<1000000; $i++) { $concatTest1 = $string1 . $string2 . $string3 . $string4 . $string5; } unset($i); $time2 = microtime(true); $testDuration1 = $time2 - $time1; $results['Test1'] = $testDuration1; $time3 = microtime(true); for ($i = 0; $i<1000000; $i++) { $concatTest2 = "{$string1}{$string2}{$string3}{$string4}{$string5}"; } unset($i); $time4 = microtime(true); $testDuration2 = $time4 - $time3; $results['Test2'] = $testDuration2; $time5 = microtime(true); for ($i = 0; $i<1000000; $i++) { $concatTest3 = implode('', array( $string1, $string2, $string3, $string4, $string5 )); } unset($i); $time6 = microtime(true); $testDuration3 = $time6 - $time5; $results['Test3'] = $testDuration3;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
2 jumps found. (Code = 44) Position 1 = 20, Position 2 = 12
Branch analysis from position: 20
1 jumps found. (Code = 42) Position 1 = 42
Branch analysis from position: 42
2 jumps found. (Code = 44) Position 1 = 44, Position 2 = 35
Branch analysis from position: 44
1 jumps found. (Code = 42) Position 1 = 70
Branch analysis from position: 70
2 jumps found. (Code = 44) Position 1 = 72, Position 2 = 59
Branch analysis from position: 72
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 59
2 jumps found. (Code = 44) Position 1 = 72, Position 2 = 59
Branch analysis from position: 72
Branch analysis from position: 59
Branch analysis from position: 35
2 jumps found. (Code = 44) Position 1 = 44, Position 2 = 35
Branch analysis from position: 44
Branch analysis from position: 35
Branch analysis from position: 12
2 jumps found. (Code = 44) Position 1 = 20, Position 2 = 12
Branch analysis from position: 20
Branch analysis from position: 12
filename:       /in/MTI96
function name:  (null)
number of ops:  82
compiled vars:  !0 = $string1, !1 = $string2, !2 = $string3, !3 = $string4, !4 = $string5, !5 = $results, !6 = $time1, !7 = $i, !8 = $concatTest1, !9 = $time2, !10 = $testDuration1, !11 = $time3, !12 = $concatTest2, !13 = $time4, !14 = $testDuration2, !15 = $time5, !16 = $concatTest3, !17 = $time6, !18 = $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        ASSIGN                                                   !5, <array>
   12     6        INIT_FCALL                                               'microtime'
          7        SEND_VAL                                                 <true>
          8        DO_ICALL                                         $25     
          9        ASSIGN                                                   !6, $25
   13    10        ASSIGN                                                   !7, 0
         11      > JMP                                                      ->18
   14    12    >   CONCAT                                           ~28     !0, !1
         13        CONCAT                                           ~29     ~28, !2
         14        CONCAT                                           ~30     ~29, !3
         15        CONCAT                                           ~31     ~30, !4
         16        ASSIGN                                                   !8, ~31
   13    17        PRE_INC                                                  !7
         18    >   IS_SMALLER                                               !7, 1000000
         19      > JMPNZ                                                    ~34, ->12
   16    20    >   UNSET_CV                                                 !7
   17    21        INIT_FCALL                                               'microtime'
         22        SEND_VAL                                                 <true>
         23        DO_ICALL                                         $35     
         24        ASSIGN                                                   !9, $35
   18    25        SUB                                              ~37     !9, !6
         26        ASSIGN                                                   !10, ~37
   19    27        ASSIGN_DIM                                               !5, 'Test1'
         28        OP_DATA                                                  !10
   21    29        INIT_FCALL                                               'microtime'
         30        SEND_VAL                                                 <true>
         31        DO_ICALL                                         $40     
         32        ASSIGN                                                   !11, $40
   22    33        ASSIGN                                                   !7, 0
         34      > JMP                                                      ->42
   23    35    >   ROPE_INIT                                     5  ~44     !0
         36        ROPE_ADD                                      1  ~44     ~44, !1
         37        ROPE_ADD                                      2  ~44     ~44, !2
         38        ROPE_ADD                                      3  ~44     ~44, !3
         39        ROPE_END                                      4  ~43     ~44, !4
         40        ASSIGN                                                   !12, ~43
   22    41        PRE_INC                                                  !7
         42    >   IS_SMALLER                                               !7, 1000000
         43      > JMPNZ                                                    ~49, ->35
   25    44    >   UNSET_CV                                                 !7
   26    45        INIT_FCALL                                               'microtime'
         46        SEND_VAL                                                 <true>
         47        DO_ICALL                                         $50     
         48        ASSIGN                                                   !13, $50
   27    49        SUB                                              ~52     !13, !11
         50        ASSIGN                                                   !14, ~52
   28    51        ASSIGN_DIM                                               !5, 'Test2'
         52        OP_DATA                                                  !14
   31    53        INIT_FCALL                                               'microtime'
         54        SEND_VAL                                                 <true>
         55        DO_ICALL                                         $55     
         56        ASSIGN                                                   !15, $55
   32    57        ASSIGN                                                   !7, 0
         58      > JMP                                                      ->70
   33    59    >   INIT_FCALL                                               'implode'
         60        SEND_VAL                                                 ''
   34    61        INIT_ARRAY                                       ~58     !0
         62        ADD_ARRAY_ELEMENT                                ~58     !1
         63        ADD_ARRAY_ELEMENT                                ~58     !2
         64        ADD_ARRAY_ELEMENT                                ~58     !3
         65        ADD_ARRAY_ELEMENT                                ~58     !4
         66        SEND_VAL                                                 ~58
         67        DO_ICALL                                         $59     
   33    68        ASSIGN                                                   !16, $59
   32    69        PRE_INC                                                  !7
         70    >   IS_SMALLER                                               !7, 1000000
         71      > JMPNZ                                                    ~62, ->59
   37    72    >   UNSET_CV                                                 !7
   38    73        INIT_FCALL                                               'microtime'
         74        SEND_VAL                                                 <true>
         75        DO_ICALL                                         $63     
         76        ASSIGN                                                   !17, $63
   39    77        SUB                                              ~65     !17, !15
         78        ASSIGN                                                   !18, ~65
   40    79        ASSIGN_DIM                                               !5, 'Test3'
         80        OP_DATA                                                  !18
         81      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.59 ms | 1404 KiB | 17 Q