3v4l.org

run code in 300+ PHP versions simultaneously
<?php $original = 4189.94; $int = (int) $original * 100; $float = $original * 100; var_dump($int); //should be 418,994 ?? var_dump($float); //should be 418,994 ?? $double = $int / 100; // should be 4189.94 again ?? var_dump($double === $original);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/J52dm
function name:  (null)
number of ops:  19
compiled vars:  !0 = $original, !1 = $int, !2 = $float, !3 = $double
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 4189.94
    5     1        CAST                                          4  ~5      !0
          2        MUL                                              ~6      ~5, 100
          3        ASSIGN                                                   !1, ~6
    6     4        MUL                                              ~8      !0, 100
          5        ASSIGN                                                   !2, ~8
    7     6        INIT_FCALL                                               'var_dump'
          7        SEND_VAR                                                 !1
          8        DO_ICALL                                                 
    8     9        INIT_FCALL                                               'var_dump'
         10        SEND_VAR                                                 !2
         11        DO_ICALL                                                 
   10    12        DIV                                              ~12     !1, 100
         13        ASSIGN                                                   !3, ~12
   12    14        INIT_FCALL                                               'var_dump'
         15        IS_IDENTICAL                                     ~14     !3, !0
         16        SEND_VAL                                                 ~14
         17        DO_ICALL                                                 
         18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.55 ms | 1394 KiB | 15 Q