3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
141.53 ms | 1401 KiB | 19 Q