3v4l.org

run code in 300+ PHP versions simultaneously
<?php $cost = 9; do { $cost++; $start = microtime(true); password_hash("test", PASSWORD_BCRYPT, ["cost" => $cost]); $end = microtime(true); } while ($end - $start < 0.1); var_dump($cost);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 44) Position 1 = 19, Position 2 = 1
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 1
filename:       /in/6mjjR
function name:  (null)
number of ops:  23
compiled vars:  !0 = $cost, !1 = $start, !2 = $end
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 9
    4     1    >   PRE_INC                                                  !0
    5     2        INIT_FCALL                                               'microtime'
          3        SEND_VAL                                                 <true>
          4        DO_ICALL                                         $5      
          5        ASSIGN                                                   !1, $5
    6     6        INIT_FCALL                                               'password_hash'
          7        SEND_VAL                                                 'test'
          8        SEND_VAL                                                 '2y'
          9        INIT_ARRAY                                       ~7      !0, 'cost'
         10        SEND_VAL                                                 ~7
         11        DO_ICALL                                                 
    7    12        INIT_FCALL                                               'microtime'
         13        SEND_VAL                                                 <true>
         14        DO_ICALL                                         $9      
         15        ASSIGN                                                   !2, $9
    8    16        SUB                                              ~11     !2, !1
         17        IS_SMALLER                                               ~11, 0.1
         18      > JMPNZ                                                    ~12, ->1
   10    19    >   INIT_FCALL                                               'var_dump'
         20        SEND_VAR                                                 !0
         21        DO_ICALL                                                 
         22      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.38 ms | 1386 KiB | 19 Q