3v4l.org

run code in 300+ PHP versions simultaneously
<?php $x = 129; $y = 1; $m = microtime(true); $y = 1 << ceil(log($x, 2)); echo microtime(true), "\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 = 28
Branch analysis from position: 28
2 jumps found. (Code = 44) Position 1 = 30, Position 2 = 26
Branch analysis from position: 30
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 26
2 jumps found. (Code = 44) Position 1 = 30, Position 2 = 26
Branch analysis from position: 30
Branch analysis from position: 26
filename:       /in/kvbrR
function name:  (null)
number of ops:  36
compiled vars:  !0 = $x, !1 = $y, !2 = $m
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                                         $5      
          5        ASSIGN                                                   !2, $5
    6     6        INIT_FCALL                                               'ceil'
          7        INIT_FCALL                                               'log'
          8        SEND_VAR                                                 !0
          9        SEND_VAL                                                 2
         10        DO_ICALL                                         $7      
         11        SEND_VAR                                                 $7
         12        DO_ICALL                                         $8      
         13        SL                                               ~9      1, $8
         14        ASSIGN                                                   !1, ~9
    7    15        INIT_FCALL                                               'microtime'
         16        SEND_VAL                                                 <true>
         17        DO_ICALL                                         $11     
         18        ECHO                                                     $11
         19        ECHO                                                     '%0A%0D'
    9    20        ASSIGN                                                   !1, 1
   10    21        INIT_FCALL                                               'microtime'
         22        SEND_VAL                                                 <true>
         23        DO_ICALL                                         $13     
         24        ASSIGN                                                   !2, $13
   11    25      > JMP                                                      ->28
   12    26    >   SL                                               ~15     !1, 1
         27        ASSIGN                                                   !1, ~15
   11    28    >   IS_SMALLER                                               !1, !0
         29      > JMPNZ                                                    ~17, ->26
   14    30    >   INIT_FCALL                                               'microtime'
         31        SEND_VAL                                                 <true>
         32        DO_ICALL                                         $18     
         33        SUB                                              ~19     $18, !2
         34        ECHO                                                     ~19
         35      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.75 ms | 1396 KiB | 19 Q