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(200000000 / 3) . "\n"; echo 200000000 / 3 . "\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/l86cg
function name:  (null)
number of ops:  45
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+7
         25        DO_FCALL                                      0  $8      
         26        CONCAT                                           ~9      $8, '%0A'
         27        ECHO                                                     ~9
   13    28        ECHO                                                     '66666666.666667%0A'
   14    29        INIT_FCALL                                               'format'
         30        SEND_VAL                                                 6.66
         31        DO_FCALL                                      0  $10     
         32        CONCAT                                           ~11     $10, '%0A'
         33        ECHO                                                     ~11
   15    34        INIT_FCALL                                               'format'
         35        SEND_VAL                                                 6
         36        DO_FCALL                                      0  $12     
         37        CONCAT                                           ~13     $12, '%0A'
         38        ECHO                                                     ~13
   16    39        INIT_FCALL                                               'format'
         40        SEND_VAL                                                 60
         41        DO_FCALL                                      0  $14     
         42        CONCAT                                           ~15     $14, '%0A'
         43        ECHO                                                     ~15
         44      > RETURN                                                   1

Function format:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/l86cg
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        SEND_VAL                                                 '.'
         10        SEND_VAL                                                 ''
         11        DO_ICALL                                         $2      
         12        SEND_VAR                                                 $2
         13        SEND_VAL                                                 '0.'
         14        DO_ICALL                                         $3      
         15        SEND_VAR                                                 $3
         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:
155.92 ms | 1394 KiB | 26 Q