3v4l.org

run code in 300+ PHP versions simultaneously
<?php $_1 = "uno"; $_3 = "tres"; $_5 = "cinco"; $t0 = microtime(TRUE); for ($i = 0; $i < 500; ++$i) { $s = "$_1 dos $_3 cuatro $_5\n"; } $t1 = microtime(TRUE); echo ($t1 - $t0) . "seconds\n"; for ($i = 0; $i < 500; ++$i) { $s = $_1 . " dos " . $_3 . " cuatro " . $_5 . "\n"; } $t2 = microtime(TRUE); echo ($t2 - $t1) . "seconds\n"; for ($i = 0; $i < 500; ++$i) { $s = $_1 . ' dos ' . $_3 . ' cuatro ' . $_5 . PHP_EOL; } $t3 = microtime(TRUE); echo ($t3 - $t2) . "seconds\n"; for ($i = 0; $i < 500; ++$i) { $s = sprintf("%s dos %s cuatro %s\n", $_1, $_3, $_5); } $t4 = microtime(TRUE); echo ($t4 - $t3) . "seconds\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 = 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 = 53
Branch analysis from position: 53
2 jumps found. (Code = 44) Position 1 = 55, Position 2 = 46
Branch analysis from position: 55
1 jumps found. (Code = 42) Position 1 = 72
Branch analysis from position: 72
2 jumps found. (Code = 44) Position 1 = 74, Position 2 = 64
Branch analysis from position: 74
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 64
2 jumps found. (Code = 44) Position 1 = 74, Position 2 = 64
Branch analysis from position: 74
Branch analysis from position: 64
Branch analysis from position: 46
2 jumps found. (Code = 44) Position 1 = 55, Position 2 = 46
Branch analysis from position: 55
Branch analysis from position: 46
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: 9
2 jumps found. (Code = 44) Position 1 = 19, Position 2 = 9
Branch analysis from position: 19
Branch analysis from position: 9
filename:       /in/iIbXC
function name:  (null)
number of ops:  82
compiled vars:  !0 = $_1, !1 = $_3, !2 = $_5, !3 = $t0, !4 = $i, !5 = $s, !6 = $t1, !7 = $t2, !8 = $t3, !9 = $t4
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'uno'
    3     1        ASSIGN                                                   !1, 'tres'
    4     2        ASSIGN                                                   !2, 'cinco'
    6     3        INIT_FCALL                                               'microtime'
          4        SEND_VAL                                                 <true>
          5        DO_ICALL                                         $13     
          6        ASSIGN                                                   !3, $13
    7     7        ASSIGN                                                   !4, 0
          8      > JMP                                                      ->17
    8     9    >   ROPE_INIT                                     6  ~17     !0
         10        ROPE_ADD                                      1  ~17     ~17, '+dos+'
         11        ROPE_ADD                                      2  ~17     ~17, !1
         12        ROPE_ADD                                      3  ~17     ~17, '+cuatro+'
         13        ROPE_ADD                                      4  ~17     ~17, !2
         14        ROPE_END                                      5  ~16     ~17, '%0A'
         15        ASSIGN                                                   !5, ~16
    7    16        PRE_INC                                                  !4
         17    >   IS_SMALLER                                               !4, 500
         18      > JMPNZ                                                    ~22, ->9
   10    19    >   INIT_FCALL                                               'microtime'
         20        SEND_VAL                                                 <true>
         21        DO_ICALL                                         $23     
         22        ASSIGN                                                   !6, $23
   11    23        SUB                                              ~25     !6, !3
         24        CONCAT                                           ~26     ~25, 'seconds%0A'
         25        ECHO                                                     ~26
   13    26        ASSIGN                                                   !4, 0
         27      > JMP                                                      ->35
   14    28    >   CONCAT                                           ~28     !0, '+dos+'
         29        CONCAT                                           ~29     ~28, !1
         30        CONCAT                                           ~30     ~29, '+cuatro+'
         31        CONCAT                                           ~31     ~30, !2
         32        CONCAT                                           ~32     ~31, '%0A'
         33        ASSIGN                                                   !5, ~32
   13    34        PRE_INC                                                  !4
         35    >   IS_SMALLER                                               !4, 500
         36      > JMPNZ                                                    ~35, ->28
   16    37    >   INIT_FCALL                                               'microtime'
         38        SEND_VAL                                                 <true>
         39        DO_ICALL                                         $36     
         40        ASSIGN                                                   !7, $36
   17    41        SUB                                              ~38     !7, !6
         42        CONCAT                                           ~39     ~38, 'seconds%0A'
         43        ECHO                                                     ~39
   19    44        ASSIGN                                                   !4, 0
         45      > JMP                                                      ->53
   20    46    >   CONCAT                                           ~41     !0, '+dos+'
         47        CONCAT                                           ~42     ~41, !1
         48        CONCAT                                           ~43     ~42, '+cuatro+'
         49        CONCAT                                           ~44     ~43, !2
         50        CONCAT                                           ~45     ~44, '%0A'
         51        ASSIGN                                                   !5, ~45
   19    52        PRE_INC                                                  !4
         53    >   IS_SMALLER                                               !4, 500
         54      > JMPNZ                                                    ~48, ->46
   22    55    >   INIT_FCALL                                               'microtime'
         56        SEND_VAL                                                 <true>
         57        DO_ICALL                                         $49     
         58        ASSIGN                                                   !8, $49
   23    59        SUB                                              ~51     !8, !7
         60        CONCAT                                           ~52     ~51, 'seconds%0A'
         61        ECHO                                                     ~52
   25    62        ASSIGN                                                   !4, 0
         63      > JMP                                                      ->72
   26    64    >   INIT_FCALL                                               'sprintf'
         65        SEND_VAL                                                 '%25s+dos+%25s+cuatro+%25s%0A'
         66        SEND_VAR                                                 !0
         67        SEND_VAR                                                 !1
         68        SEND_VAR                                                 !2
         69        DO_ICALL                                         $54     
         70        ASSIGN                                                   !5, $54
   25    71        PRE_INC                                                  !4
         72    >   IS_SMALLER                                               !4, 500
         73      > JMPNZ                                                    ~57, ->64
   28    74    >   INIT_FCALL                                               'microtime'
         75        SEND_VAL                                                 <true>
         76        DO_ICALL                                         $58     
         77        ASSIGN                                                   !9, $58
   29    78        SUB                                              ~60     !9, !8
         79        CONCAT                                           ~61     ~60, 'seconds%0A'
         80        ECHO                                                     ~61
         81      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.35 ms | 1409 KiB | 17 Q