3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Set the Max Size recommended for cache files $max_size = apply_filters('autoptimize_filter_cachecheck_maxsize', 512 * 1024 * 1024)|1; $bytes = $stats[1]|1; // Set the first commons International System of Units (SI) bytes Prefix $si_prefix = array( 'B', 'KB', 'MB', 'GB' ); $class = min( (int) log( $bytes , 1024 ), count( $si_prefix ) - 1 ); // We format the total bytes of cache as appropriate, either in B, KB, MB or GB $size = sprintf( '%1.2f', $bytes / pow( 1024, $class ) ) . ' ' . $si_prefix[ $class ]; // We calculated the percentage of cache used $percentage = ceil( $bytes / $max_size * 100 ); var_dump($class, $size, $percentage);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/oel1b
function name:  (null)
number of ops:  47
compiled vars:  !0 = $max_size, !1 = $bytes, !2 = $stats, !3 = $si_prefix, !4 = $class, !5 = $size, !6 = $percentage
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   INIT_FCALL_BY_NAME                                       'apply_filters'
          1        SEND_VAL_EX                                              'autoptimize_filter_cachecheck_maxsize'
          2        SEND_VAL_EX                                              536870912
          3        DO_FCALL                                      0  $7      
          4        BW_OR                                            ~8      $7, 1
          5        ASSIGN                                                   !0, ~8
    6     6        FETCH_DIM_R                                      ~10     !2, 1
          7        BW_OR                                            ~11     ~10, 1
          8        ASSIGN                                                   !1, ~11
    9     9        ASSIGN                                                   !3, <array>
   10    10        INIT_FCALL                                               'min'
         11        INIT_FCALL                                               'log'
         12        SEND_VAR                                                 !1
         13        SEND_VAL                                                 1024
         14        DO_ICALL                                         $14     
         15        CAST                                          4  ~15     $14
         16        SEND_VAL                                                 ~15
         17        COUNT                                            ~16     !3
         18        SUB                                              ~17     ~16, 1
         19        SEND_VAL                                                 ~17
         20        DO_ICALL                                         $18     
         21        ASSIGN                                                   !4, $18
   12    22        INIT_FCALL                                               'sprintf'
         23        SEND_VAL                                                 '%251.2f'
         24        INIT_FCALL                                               'pow'
         25        SEND_VAL                                                 1024
         26        SEND_VAR                                                 !4
         27        DO_ICALL                                         $20     
         28        DIV                                              ~21     !1, $20
         29        SEND_VAL                                                 ~21
         30        DO_ICALL                                         $22     
         31        CONCAT                                           ~23     $22, '+'
         32        FETCH_DIM_R                                      ~24     !3, !4
         33        CONCAT                                           ~25     ~23, ~24
         34        ASSIGN                                                   !5, ~25
   14    35        INIT_FCALL                                               'ceil'
         36        DIV                                              ~27     !1, !0
         37        MUL                                              ~28     ~27, 100
         38        SEND_VAL                                                 ~28
         39        DO_ICALL                                         $29     
         40        ASSIGN                                                   !6, $29
   16    41        INIT_FCALL                                               'var_dump'
         42        SEND_VAR                                                 !4
         43        SEND_VAR                                                 !5
         44        SEND_VAR                                                 !6
         45        DO_ICALL                                                 
         46      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
176.48 ms | 1405 KiB | 25 Q