3v4l.org

run code in 300+ PHP versions simultaneously
<?php $x = 129; $i = 1; $y = 1; $m = microtime(true); for ($i = 1; $i <= 1000; ++$i){ $y = 1 << ceil(log($x, 2)); } echo microtime(true) - $m, "\n\r"; $y = 1; $m = microtime(true); for ($i = 1; $i <= 1000; ++$i){ while ($y < $x) { $y = $y <<1; } } echo microtime(true) - $m, "\n\r";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
2 jumps found. (Code = 44) Position 1 = 21, Position 2 = 9
Branch analysis from position: 21
1 jumps found. (Code = 42) Position 1 = 40
Branch analysis from position: 40
2 jumps found. (Code = 44) Position 1 = 42, Position 2 = 34
Branch analysis from position: 42
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 34
1 jumps found. (Code = 42) Position 1 = 37
Branch analysis from position: 37
2 jumps found. (Code = 44) Position 1 = 39, Position 2 = 35
Branch analysis from position: 39
2 jumps found. (Code = 44) Position 1 = 42, Position 2 = 34
Branch analysis from position: 42
Branch analysis from position: 34
Branch analysis from position: 35
2 jumps found. (Code = 44) Position 1 = 39, Position 2 = 35
Branch analysis from position: 39
Branch analysis from position: 35
Branch analysis from position: 9
2 jumps found. (Code = 44) Position 1 = 21, Position 2 = 9
Branch analysis from position: 21
Branch analysis from position: 9
filename:       /in/laU3Q
function name:  (null)
number of ops:  49
compiled vars:  !0 = $x, !1 = $i, !2 = $y, !3 = $m
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 129
    3     1        ASSIGN                                                   !1, 1
    5     2        ASSIGN                                                   !2, 1
    6     3        INIT_FCALL                                               'microtime'
          4        SEND_VAL                                                 <true>
          5        DO_ICALL                                         $7      
          6        ASSIGN                                                   !3, $7
    7     7        ASSIGN                                                   !1, 1
          8      > JMP                                                      ->19
    8     9    >   INIT_FCALL                                               'ceil'
         10        INIT_FCALL                                               'log'
         11        SEND_VAR                                                 !0
         12        SEND_VAL                                                 2
         13        DO_ICALL                                         $10     
         14        SEND_VAR                                                 $10
         15        DO_ICALL                                         $11     
         16        SL                                               ~12     1, $11
         17        ASSIGN                                                   !2, ~12
    7    18        PRE_INC                                                  !1
         19    >   IS_SMALLER_OR_EQUAL                                      !1, 1000
         20      > JMPNZ                                                    ~15, ->9
   10    21    >   INIT_FCALL                                               'microtime'
         22        SEND_VAL                                                 <true>
         23        DO_ICALL                                         $16     
         24        SUB                                              ~17     $16, !3
         25        ECHO                                                     ~17
         26        ECHO                                                     '%0A%0D'
   12    27        ASSIGN                                                   !2, 1
   13    28        INIT_FCALL                                               'microtime'
         29        SEND_VAL                                                 <true>
         30        DO_ICALL                                         $19     
         31        ASSIGN                                                   !3, $19
   14    32        ASSIGN                                                   !1, 1
         33      > JMP                                                      ->40
   15    34    > > JMP                                                      ->37
   16    35    >   SL                                               ~22     !2, 1
         36        ASSIGN                                                   !2, ~22
   15    37    >   IS_SMALLER                                               !2, !0
         38      > JMPNZ                                                    ~24, ->35
   14    39    >   PRE_INC                                                  !1
         40    >   IS_SMALLER_OR_EQUAL                                      !1, 1000
         41      > JMPNZ                                                    ~26, ->34
   19    42    >   INIT_FCALL                                               'microtime'
         43        SEND_VAL                                                 <true>
         44        DO_ICALL                                         $27     
         45        SUB                                              ~28     $27, !3
         46        ECHO                                                     ~28
         47        ECHO                                                     '%0A%0D'
         48      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.77 ms | 1400 KiB | 19 Q