3v4l.org

run code in 500+ PHP versions simultaneously
<?php var_dump(PHP_FLOAT_DIG, strlen(50000)); var_dump(round( 5, 12), round((float) 5, 12), round(5.0, 12)); var_dump(round( 5, 15), round((float) 5, 15), round(5.0, 15)); // This will fail in PHP 8.4 and add a ton of 0's and a 1 after the decimal because the length of the number (past the decimal to the left) plus the length of the precision is one higher than the PHP_FLOAT_DIG value, but only for the float values var_dump(round( 50, 12), round((float) 50, 12), round(50.0, 12)); var_dump(round( 500, 12), round((float) 500, 12), round(500.0, 12)); var_dump(round( 5000, 12), round((float) 5000, 12), round(5000.0, 12)); // This will fail in PHP 8.4 and add a ton of 0's and a 1 after the decimal because the length of the number (past the decimal to the left) plus the length of the precision is one higher than the PHP_FLOAT_DIG value, but only for the float values var_dump(round( 50000, 12), round((float) 50000, 12), round(50000.0, 12)); var_dump(round( 50000, 11), round((float) 50000, 11), round(50000.0, 11)); // This will fail in PHP 8.4 and add a ton of 0's and a 1 after the decimal because the length of the number (past the decimal to the left) plus the length of the precision is one higher than the PHP_FLOAT_DIG value, but only for the float values
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/T5M4U
function name:  (null)
number of ops:  132
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                                   'var_dump'
          1        SEND_VAL                                                     15
          2        STRLEN                                               ~0      50000
          3        SEND_VAL                                                     ~0
          4        DO_ICALL                                                     
    4     5        INIT_FCALL                                                   'var_dump'
          6        INIT_FCALL                                                   'round'
          7        SEND_VAL                                                     5
          8        SEND_VAL                                                     12
          9        DO_ICALL                                             $2      
         10        SEND_VAR                                                     $2
         11        INIT_FCALL                                                   'round'
         12        CAST                                              5  ~3      5
         13        SEND_VAL                                                     ~3
         14        SEND_VAL                                                     12
         15        DO_ICALL                                             $4      
         16        SEND_VAR                                                     $4
         17        INIT_FCALL                                                   'round'
         18        SEND_VAL                                                     5
         19        SEND_VAL                                                     12
         20        DO_ICALL                                             $5      
         21        SEND_VAR                                                     $5
         22        DO_ICALL                                                     
    5    23        INIT_FCALL                                                   'var_dump'
         24        INIT_FCALL                                                   'round'
         25        SEND_VAL                                                     5
         26        SEND_VAL                                                     15
         27        DO_ICALL                                             $7      
         28        SEND_VAR                                                     $7
         29        INIT_FCALL                                                   'round'
         30        CAST                                              5  ~8      5
         31        SEND_VAL                                                     ~8
         32        SEND_VAL                                                     15
         33        DO_ICALL                                             $9      
         34        SEND_VAR                                                     $9
         35        INIT_FCALL                                                   'round'
         36        SEND_VAL                                                     5
         37        SEND_VAL                                                     15
         38        DO_ICALL                                             $10     
         39        SEND_VAR                                                     $10
         40        DO_ICALL                                                     
    6    41        INIT_FCALL                                                   'var_dump'
         42        INIT_FCALL                                                   'round'
         43        SEND_VAL                                                     50
         44        SEND_VAL                                                     12
         45        DO_ICALL                                             $12     
         46        SEND_VAR                                                     $12
         47        INIT_FCALL                                                   'round'
         48        CAST                                              5  ~13     50
         49        SEND_VAL                                                     ~13
         50        SEND_VAL                                                     12
         51        DO_ICALL                                             $14     
         52        SEND_VAR                                                     $14
         53        INIT_FCALL                                                   'round'
         54        SEND_VAL                                                     50
         55        SEND_VAL                                                     12
         56        DO_ICALL                                             $15     
         57        SEND_VAR                                                     $15
         58        DO_ICALL                                                     
    7    59        INIT_FCALL                                                   'var_dump'
         60        INIT_FCALL                                                   'round'
         61        SEND_VAL                                                     500
         62        SEND_VAL                                                     12
         63        DO_ICALL                                             $17     
         64        SEND_VAR                                                     $17
         65        INIT_FCALL                                                   'round'
         66        CAST                                              5  ~18     500
         67        SEND_VAL                                                     ~18
         68        SEND_VAL                                                     12
         69        DO_ICALL                                             $19     
         70        SEND_VAR                                                     $19
         71        INIT_FCALL                                                   'round'
         72        SEND_VAL                                                     500
         73        SEND_VAL                                                     12
         74        DO_ICALL                                             $20     
         75        SEND_VAR                                                     $20
         76        DO_ICALL                                                     
    8    77        INIT_FCALL                                                   'var_dump'
         78        INIT_FCALL                                                   'round'
         79        SEND_VAL                                                     5000
         80        SEND_VAL                                                     12
         81        DO_ICALL                                             $22     
         82        SEND_VAR                                                     $22
         83        INIT_FCALL                                                   'round'
         84        CAST                                              5  ~23     5000
         85        SEND_VAL                                                     ~23
         86        SEND_VAL                                                     12
         87        DO_ICALL                                             $24     
         88        SEND_VAR                                                     $24
         89        INIT_FCALL                                                   'round'
         90        SEND_VAL                                                     5000
         91        SEND_VAL                                                     12
         92        DO_ICALL                                             $25     
         93        SEND_VAR                                                     $25
         94        DO_ICALL                                                     
    9    95        INIT_FCALL                                                   'var_dump'
         96        INIT_FCALL                                                   'round'
         97        SEND_VAL                                                     50000
         98        SEND_VAL                                                     12
         99        DO_ICALL                                             $27     
        100        SEND_VAR                                                     $27
        101        INIT_FCALL                                                   'round'
        102        CAST                                              5  ~28     50000
        103        SEND_VAL                                                     ~28
        104        SEND_VAL                                                     12
        105        DO_ICALL                                             $29     
        106        SEND_VAR                                                     $29
        107        INIT_FCALL                                                   'round'
        108        SEND_VAL                                                     50000
        109        SEND_VAL                                                     12
        110        DO_ICALL                                             $30     
        111        SEND_VAR                                                     $30
        112        DO_ICALL                                                     
   10   113        INIT_FCALL                                                   'var_dump'
        114        INIT_FCALL                                                   'round'
        115        SEND_VAL                                                     50000
        116        SEND_VAL                                                     11
        117        DO_ICALL                                             $32     
        118        SEND_VAR                                                     $32
        119        INIT_FCALL                                                   'round'
        120        CAST                                              5  ~33     50000
        121        SEND_VAL                                                     ~33
        122        SEND_VAL                                                     11
        123        DO_ICALL                                             $34     
        124        SEND_VAR                                                     $34
        125        INIT_FCALL                                                   'round'
        126        SEND_VAL                                                     50000
        127        SEND_VAL                                                     11
        128        DO_ICALL                                             $35     
        129        SEND_VAR                                                     $35
        130        DO_ICALL                                                     
        131      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
153.56 ms | 500 KiB | 11 Q