3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = ["6c","af","2a","7c","27","62","42","d0","2a","7b","9e","0b","fa","d9","cc","0e","10","fb","eb","a5","af","2f","d9","d5","d7","f4","b6"]; //////////////////////////////////////////////////////////////////// $time_start = microtime(true); foreach($arr as $lang) { echo "value_{$lang}"; } $time_end = microtime(true); $time1 = $time_end - $time_start; echo "Did nothing in $time1 seconds\n"; ///////////////////////////////////////////////////////////////////// $time_start = microtime(true); foreach($arr as $lang) { echo $lang; } $time_end = microtime(true); $time2 = $time_end - $time_start; echo "Did nothing in $time2 seconds\n"; echo $time1 <=> $time2; echo PHP_EOL . ($time1 - $time2) . ((int)($time1/$time2)*100) . '%';
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 6, Position 2 = 11
Branch analysis from position: 6
2 jumps found. (Code = 78) Position 1 = 7, Position 2 = 11
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
Branch analysis from position: 11
2 jumps found. (Code = 77) Position 1 = 27, Position 2 = 30
Branch analysis from position: 27
2 jumps found. (Code = 78) Position 1 = 28, Position 2 = 30
Branch analysis from position: 28
1 jumps found. (Code = 42) Position 1 = 27
Branch analysis from position: 27
Branch analysis from position: 30
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 30
Branch analysis from position: 11
filename:       /in/2Mk9T
function name:  (null)
number of ops:  52
compiled vars:  !0 = $arr, !1 = $time_start, !2 = $lang, !3 = $time_end, !4 = $time1, !5 = $time2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    5     1        INIT_FCALL                                               'microtime'
          2        SEND_VAL                                                 <true>
          3        DO_ICALL                                         $7      
          4        ASSIGN                                                   !1, $7
    6     5      > FE_RESET_R                                       $9      !0, ->11
          6    > > FE_FETCH_R                                               $9, !2, ->11
    7     7    >   NOP                                                      
          8        FAST_CONCAT                                      ~10     'value_', !2
          9        ECHO                                                     ~10
    6    10      > JMP                                                      ->6
         11    >   FE_FREE                                                  $9
    9    12        INIT_FCALL                                               'microtime'
         13        SEND_VAL                                                 <true>
         14        DO_ICALL                                         $11     
         15        ASSIGN                                                   !3, $11
   11    16        SUB                                              ~13     !3, !1
         17        ASSIGN                                                   !4, ~13
   12    18        ROPE_INIT                                     3  ~16     'Did+nothing+in+'
         19        ROPE_ADD                                      1  ~16     ~16, !4
         20        ROPE_END                                      2  ~15     ~16, '+seconds%0A'
         21        ECHO                                                     ~15
   15    22        INIT_FCALL                                               'microtime'
         23        SEND_VAL                                                 <true>
         24        DO_ICALL                                         $18     
         25        ASSIGN                                                   !1, $18
   16    26      > FE_RESET_R                                       $20     !0, ->30
         27    > > FE_FETCH_R                                               $20, !2, ->30
   17    28    >   ECHO                                                     !2
   16    29      > JMP                                                      ->27
         30    >   FE_FREE                                                  $20
   19    31        INIT_FCALL                                               'microtime'
         32        SEND_VAL                                                 <true>
         33        DO_ICALL                                         $21     
         34        ASSIGN                                                   !3, $21
   21    35        SUB                                              ~23     !3, !1
         36        ASSIGN                                                   !5, ~23
   22    37        ROPE_INIT                                     3  ~26     'Did+nothing+in+'
         38        ROPE_ADD                                      1  ~26     ~26, !5
         39        ROPE_END                                      2  ~25     ~26, '+seconds%0A'
         40        ECHO                                                     ~25
   24    41        SPACESHIP                                        ~28     !4, !5
         42        ECHO                                                     ~28
   25    43        SUB                                              ~29     !4, !5
         44        CONCAT                                           ~30     '%0A', ~29
         45        DIV                                              ~31     !4, !5
         46        CAST                                          4  ~32     ~31
         47        MUL                                              ~33     ~32, 100
         48        CONCAT                                           ~34     ~30, ~33
         49        CONCAT                                           ~35     ~34, '%25'
         50        ECHO                                                     ~35
         51      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.88 ms | 1400 KiB | 15 Q