3v4l.org

run code in 300+ PHP versions simultaneously
<?php $lorem = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut congue, turpis fermentum tempus ultricies, tellus purus vulputate ipsum, eu tempus metus ipsum vel felis. Mauris feugiat nibh at sollicitudin ultrices. Vestibulum suscipit libero a nulla vehicula lobortis. Vestibulum sit amet risus adipiscing, pharetra nulla id, ullamcorper lorem. Fusce facilisis consequat turpis. Fusce posuere, dui vel condimentum varius, turpis risus ullamcorper tortor, ac laoreet mi dui at urna. Aenean vitae lacus mauris. Proin aliquam sem pulvinar velit lacinia ultricies. Mauris scelerisque sem libero, at semper ante convallis quis. Mauris in mi quis tortor malesuada consectetur. Donec a purus vehicula, vehicula risus sed, vestibulum nibh. Nam ornare metus ut rhoncus rhoncus. Integer cursus, est a condimentum sollicitudin, ipsum quam tincidunt quam, quis lobortis risus augue nec odio. Vivamus vel est eget augue lacinia pulvinar.'; $words = explode(' ', $lorem); for ($i = 0; $i < 10; $i++) { $words = array_merge($words, $words); } shuffle($words); $startTime = microtime(true); $str = join("\n\r", $words); echo 'Join '.count($words).' words: '.(microtime(true) - $startTime).PHP_EOL; $str = ''; $startTime = microtime(true); foreach ($words as $value) { $str .= $value . "\n\r"; } echo 'Concat '.count($words).' words: '.(microtime(true) - $startTime).PHP_EOL;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
2 jumps found. (Code = 44) Position 1 = 16, Position 2 = 8
Branch analysis from position: 16
2 jumps found. (Code = 77) Position 1 = 44, Position 2 = 48
Branch analysis from position: 44
2 jumps found. (Code = 78) Position 1 = 45, Position 2 = 48
Branch analysis from position: 45
1 jumps found. (Code = 42) Position 1 = 44
Branch analysis from position: 44
Branch analysis from position: 48
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 48
Branch analysis from position: 8
2 jumps found. (Code = 44) Position 1 = 16, Position 2 = 8
Branch analysis from position: 16
Branch analysis from position: 8
filename:       /in/1otmf
function name:  (null)
number of ops:  60
compiled vars:  !0 = $lorem, !1 = $words, !2 = $i, !3 = $startTime, !4 = $str, !5 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'Lorem+ipsum+dolor+sit+amet%2C+consectetur+adipiscing+elit.+Ut+congue%2C+turpis+fermentum+tempus+ultricies%2C+tellus+purus+vulputate+ipsum%2C+eu+tempus+metus+ipsum+vel+felis.+Mauris+feugiat+nibh+at+sollicitudin+ultrices.+Vestibulum+suscipit+libero+a+nulla+vehicula+lobortis.+Vestibulum+sit+amet+risus+adipiscing%2C+pharetra+nulla+id%2C+ullamcorper+lorem.+Fusce+facilisis+consequat+turpis.+Fusce+posuere%2C+dui+vel+condimentum+varius%2C+turpis+risus+ullamcorper+tortor%2C+ac+laoreet+mi+dui+at+urna.+Aenean+vitae+lacus+mauris.+Proin+aliquam+sem+pulvinar+velit+lacinia+ultricies.+Mauris+scelerisque+sem+libero%2C+at+semper+ante+convallis+quis.+Mauris+in+mi+quis+tortor+malesuada+consectetur.+Donec+a+purus+vehicula%2C+vehicula+risus+sed%2C+vestibulum+nibh.+Nam+ornare+metus+ut+rhoncus+rhoncus.+Integer+cursus%2C+est+a+condimentum+sollicitudin%2C+ipsum+quam+tincidunt+quam%2C+quis+lobortis+risus+augue+nec+odio.+Vivamus+vel+est+eget+augue+lacinia+pulvinar.'
    4     1        INIT_FCALL                                               'explode'
          2        SEND_VAL                                                 '+'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $7      
          5        ASSIGN                                                   !1, $7
    5     6        ASSIGN                                                   !2, 0
          7      > JMP                                                      ->14
    6     8    >   INIT_FCALL                                               'array_merge'
          9        SEND_VAR                                                 !1
         10        SEND_VAR                                                 !1
         11        DO_ICALL                                         $10     
         12        ASSIGN                                                   !1, $10
    5    13        PRE_INC                                                  !2
         14    >   IS_SMALLER                                               !2, 10
         15      > JMPNZ                                                    ~13, ->8
    8    16    >   INIT_FCALL                                               'shuffle'
         17        SEND_REF                                                 !1
         18        DO_ICALL                                                 
   10    19        INIT_FCALL                                               'microtime'
         20        SEND_VAL                                                 <true>
         21        DO_ICALL                                         $15     
         22        ASSIGN                                                   !3, $15
   11    23        INIT_FCALL                                               'join'
         24        SEND_VAL                                                 '%0A%0D'
         25        SEND_VAR                                                 !1
         26        DO_ICALL                                         $17     
         27        ASSIGN                                                   !4, $17
   12    28        COUNT                                            ~19     !1
         29        CONCAT                                           ~20     'Join+', ~19
         30        CONCAT                                           ~21     ~20, '+words%3A+'
         31        INIT_FCALL                                               'microtime'
         32        SEND_VAL                                                 <true>
         33        DO_ICALL                                         $22     
         34        SUB                                              ~23     $22, !3
         35        CONCAT                                           ~24     ~21, ~23
         36        CONCAT                                           ~25     ~24, '%0A'
         37        ECHO                                                     ~25
   14    38        ASSIGN                                                   !4, ''
   16    39        INIT_FCALL                                               'microtime'
         40        SEND_VAL                                                 <true>
         41        DO_ICALL                                         $27     
         42        ASSIGN                                                   !3, $27
   17    43      > FE_RESET_R                                       $29     !1, ->48
         44    > > FE_FETCH_R                                               $29, !5, ->48
   18    45    >   CONCAT                                           ~30     !5, '%0A%0D'
         46        ASSIGN_OP                                     8          !4, ~30
   17    47      > JMP                                                      ->44
         48    >   FE_FREE                                                  $29
   20    49        COUNT                                            ~32     !1
         50        CONCAT                                           ~33     'Concat+', ~32
         51        CONCAT                                           ~34     ~33, '+words%3A+'
         52        INIT_FCALL                                               'microtime'
         53        SEND_VAL                                                 <true>
         54        DO_ICALL                                         $35     
         55        SUB                                              ~36     $35, !3
         56        CONCAT                                           ~37     ~34, ~36
         57        CONCAT                                           ~38     ~37, '%0A'
         58        ECHO                                                     ~38
         59      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.92 ms | 1469 KiB | 18 Q