3v4l.org

run code in 300+ PHP versions simultaneously
<?php $size = 16692000000; function file_size($size) { $fileSizeinGB = $size / 1024 / 1024 / 1024; return round($fileSizeinGB); } echo file_size($size);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9pj2X
function name:  (null)
number of ops:  6
compiled vars:  !0 = $size
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 16692000000
   10     1        INIT_FCALL                                               'file_size'
          2        SEND_VAR                                                 !0
          3        DO_FCALL                                      0  $2      
          4        ECHO                                                     $2
          5      > RETURN                                                   1

Function file_size:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9pj2X
function name:  file_size
number of ops:  10
compiled vars:  !0 = $size, !1 = $fileSizeinGB
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
    6     1        DIV                                              ~2      !0, 1024
          2        DIV                                              ~3      ~2, 1024
          3        DIV                                              ~4      ~3, 1024
          4        ASSIGN                                                   !1, ~4
    7     5        INIT_FCALL                                               'round'
          6        SEND_VAR                                                 !1
          7        DO_ICALL                                         $6      
          8      > RETURN                                                   $6
    8     9*     > RETURN                                                   null

End of function file_size

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
136.66 ms | 1397 KiB | 16 Q