3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo var_export(20 / 3 * 1e6, true) . "\n"; echo var_export(6.66, true) . "\n"; echo var_export(6.0, true) . "\n"; function format($f) { return rtrim(rtrim(number_format($f, ini_get('precision')), '.', ''), '0', '.'); } echo format(20/3) . "\n"; echo format(20/3 * 1e6) . "\n"; echo format(6.66) . "\n"; echo format(6.0) . "\n"; echo format(60.0) . "\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uh3UB
function name:  (null)
number of ops:  44
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'var_export'
          1        SEND_VAL                                                 6.66667e+6
          2        SEND_VAL                                                 <true>
          3        DO_ICALL                                         $0      
          4        CONCAT                                           ~1      $0, '%0A'
          5        ECHO                                                     ~1
    3     6        INIT_FCALL                                               'var_export'
          7        SEND_VAL                                                 6.66
          8        SEND_VAL                                                 <true>
          9        DO_ICALL                                         $2      
         10        CONCAT                                           ~3      $2, '%0A'
         11        ECHO                                                     ~3
    4    12        INIT_FCALL                                               'var_export'
         13        SEND_VAL                                                 6
         14        SEND_VAL                                                 <true>
         15        DO_ICALL                                         $4      
         16        CONCAT                                           ~5      $4, '%0A'
         17        ECHO                                                     ~5
   11    18        INIT_FCALL                                               'format'
         19        SEND_VAL                                                 6.66667
         20        DO_FCALL                                      0  $6      
         21        CONCAT                                           ~7      $6, '%0A'
         22        ECHO                                                     ~7
   12    23        INIT_FCALL                                               'format'
         24        SEND_VAL                                                 6.66667e+6
         25        DO_FCALL                                      0  $8      
         26        CONCAT                                           ~9      $8, '%0A'
         27        ECHO                                                     ~9
   13    28        INIT_FCALL                                               'format'
         29        SEND_VAL                                                 6.66
         30        DO_FCALL                                      0  $10     
         31        CONCAT                                           ~11     $10, '%0A'
         32        ECHO                                                     ~11
   14    33        INIT_FCALL                                               'format'
         34        SEND_VAL                                                 6
         35        DO_FCALL                                      0  $12     
         36        CONCAT                                           ~13     $12, '%0A'
         37        ECHO                                                     ~13
   15    38        INIT_FCALL                                               'format'
         39        SEND_VAL                                                 60
         40        DO_FCALL                                      0  $14     
         41        CONCAT                                           ~15     $14, '%0A'
         42        ECHO                                                     ~15
         43      > RETURN                                                   1

Function format:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uh3UB
function name:  format
number of ops:  20
compiled vars:  !0 = $f
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
    8     1        INIT_FCALL                                               'rtrim'
          2        INIT_FCALL                                               'rtrim'
          3        INIT_FCALL                                               'number_format'
          4        SEND_VAR                                                 !0
          5        INIT_FCALL                                               'ini_get'
          6        SEND_VAL                                                 'precision'
          7        DO_ICALL                                         $1      
          8        SEND_VAR                                                 $1
          9        DO_ICALL                                         $2      
         10        SEND_VAR                                                 $2
         11        SEND_VAL                                                 '.'
         12        SEND_VAL                                                 ''
         13        DO_ICALL                                         $3      
         14        SEND_VAR                                                 $3
         15        SEND_VAL                                                 '0'
         16        SEND_VAL                                                 '.'
         17        DO_ICALL                                         $4      
         18      > RETURN                                                   $4
    9    19*     > RETURN                                                   null

End of function format

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
217.37 ms | 1402 KiB | 26 Q