3v4l.org

run code in 500+ PHP versions simultaneously
<?php var_dump(0.1 + 0.7 === 0.8); // bool(false) var_dump((0.1 + 0.7) * 10); // float(7.999999999999999) var_dump((int) ((0.1 + 0.7) * 10)); // int(7) <- The classic! // It hides well, too: echo 0.1 + 0.2.\PHP_EOL; // 0.3 <- The float value will be coerced to string. printf("%.20f\n", 0.1 + 0.2); // 0.30000000000000004441
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/XmHkF
function name:  (null)
number of ops:  16
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                                   'var_dump'
          1        SEND_VAL                                                     <false>
          2        DO_ICALL                                                     
    4     3        INIT_FCALL                                                   'var_dump'
          4        SEND_VAL                                                     8
          5        DO_ICALL                                                     
    5     6        INIT_FCALL                                                   'var_dump'
          7        CAST                                              4  ~2      8
          8        SEND_VAL                                                     ~2
          9        DO_ICALL                                                     
    8    10        ECHO                                                         '0.3%0A'
    9    11        INIT_FCALL                                                   'printf'
         12        SEND_VAL                                                     '%25.20f%0A'
         13        SEND_VAL                                                     0.3
         14        DO_ICALL                                                     
         15      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
147.55 ms | 1412 KiB | 15 Q