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); $o = $time1 - $time2; echo ($o/$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/kqsP3
function name:  (null)
number of ops:  53
compiled vars:  !0 = $arr, !1 = $time_start, !2 = $lang, !3 = $time_end, !4 = $time1, !5 = $time2, !6 = $o
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                                         $8      
          4        ASSIGN                                                   !1, $8
    6     5      > FE_RESET_R                                       $10     !0, ->11
          6    > > FE_FETCH_R                                               $10, !2, ->11
    7     7    >   NOP                                                      
          8        FAST_CONCAT                                      ~11     'value_', !2
          9        ECHO                                                     ~11
    6    10      > JMP                                                      ->6
         11    >   FE_FREE                                                  $10
    9    12        INIT_FCALL                                               'microtime'
         13        SEND_VAL                                                 <true>
         14        DO_ICALL                                         $12     
         15        ASSIGN                                                   !3, $12
   11    16        SUB                                              ~14     !3, !1
         17        ASSIGN                                                   !4, ~14
   12    18        ROPE_INIT                                     3  ~17     'Did+nothing+in+'
         19        ROPE_ADD                                      1  ~17     ~17, !4
         20        ROPE_END                                      2  ~16     ~17, '+seconds%0A'
         21        ECHO                                                     ~16
   15    22        INIT_FCALL                                               'microtime'
         23        SEND_VAL                                                 <true>
         24        DO_ICALL                                         $19     
         25        ASSIGN                                                   !1, $19
   16    26      > FE_RESET_R                                       $21     !0, ->30
         27    > > FE_FETCH_R                                               $21, !2, ->30
   17    28    >   ECHO                                                     !2
   16    29      > JMP                                                      ->27
         30    >   FE_FREE                                                  $21
   19    31        INIT_FCALL                                               'microtime'
         32        SEND_VAL                                                 <true>
         33        DO_ICALL                                         $22     
         34        ASSIGN                                                   !3, $22
   21    35        SUB                                              ~24     !3, !1
         36        ASSIGN                                                   !5, ~24
   22    37        ROPE_INIT                                     3  ~27     'Did+nothing+in+'
         38        ROPE_ADD                                      1  ~27     ~27, !5
         39        ROPE_END                                      2  ~26     ~27, '+seconds%0A'
         40        ECHO                                                     ~26
   24    41        SPACESHIP                                        ~29     !4, !5
         42        ECHO                                                     ~29
   25    43        SUB                                              ~30     !4, !5
         44        CONCAT                                           ~31     '%0A', ~30
         45        ECHO                                                     ~31
   27    46        SUB                                              ~32     !4, !5
         47        ASSIGN                                                   !6, ~32
   29    48        DIV                                              ~34     !6, !5
         49        MUL                                              ~35     ~34, 100
         50        CONCAT                                           ~36     ~35, '%25'
         51        ECHO                                                     ~36
         52      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.93 ms | 945 KiB | 16 Q