3v4l.org

run code in 500+ PHP versions simultaneously
<?php $size ='12,2'; $unit = 'b'; var_dump(round($size * pow(1024, stripos('bkmgtpezy', $unit[0])))); var_dump(round((float) $size));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/XcqDT
function name:  (null)
number of ops:  26
compiled vars:  !0 = $size, !1 = $unit
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, '12%2C2'
    4     1        ASSIGN                                                       !1, 'b'
    5     2        INIT_FCALL                                                   'var_dump'
          3        INIT_FCALL                                                   'round'
          4        INIT_FCALL                                                   'pow'
          5        SEND_VAL                                                     1024
          6        INIT_FCALL                                                   'stripos'
          7        SEND_VAL                                                     'bkmgtpezy'
          8        FETCH_DIM_R                                          ~4      !1, 0
          9        SEND_VAL                                                     ~4
         10        DO_ICALL                                             $5      
         11        SEND_VAR                                                     $5
         12        DO_ICALL                                             $6      
         13        MUL                                                  ~7      !0, $6
         14        SEND_VAL                                                     ~7
         15        DO_ICALL                                             $8      
         16        SEND_VAR                                                     $8
         17        DO_ICALL                                                     
    7    18        INIT_FCALL                                                   'var_dump'
         19        INIT_FCALL                                                   'round'
         20        CAST                                              5  ~10     !0
         21        SEND_VAL                                                     ~10
         22        DO_ICALL                                             $11     
         23        SEND_VAR                                                     $11
         24        DO_ICALL                                                     
         25      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
137.83 ms | 2140 KiB | 17 Q