3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = 0.03; $b = 1 - 0.97; $c = (float)(string) 0.03; $d = (float)(string) (1 - 0.97); var_dump($a, $b, $a === $b, $c, $d, $c === $d); var_dump(sprintf('%1.18f', $b), sprintf('%1.18f', $d));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DYtss
function name:  (null)
number of ops:  31
compiled vars:  !0 = $a, !1 = $b, !2 = $c, !3 = $d
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 0.03
    3     1        ASSIGN                                                   !1, 0.03
    4     2        CAST                                          6  ~6      0.03
          3        CAST                                          5  ~7      ~6
          4        ASSIGN                                                   !2, ~7
    5     5        CAST                                          6  ~9      0.03
          6        CAST                                          5  ~10     ~9
          7        ASSIGN                                                   !3, ~10
    7     8        INIT_FCALL                                               'var_dump'
          9        SEND_VAR                                                 !0
         10        SEND_VAR                                                 !1
         11        IS_IDENTICAL                                     ~12     !0, !1
         12        SEND_VAL                                                 ~12
         13        SEND_VAR                                                 !2
         14        SEND_VAR                                                 !3
         15        IS_IDENTICAL                                     ~13     !2, !3
         16        SEND_VAL                                                 ~13
         17        DO_ICALL                                                 
    8    18        INIT_FCALL                                               'var_dump'
         19        INIT_FCALL                                               'sprintf'
         20        SEND_VAL                                                 '%251.18f'
         21        SEND_VAR                                                 !1
         22        DO_ICALL                                         $15     
         23        SEND_VAR                                                 $15
         24        INIT_FCALL                                               'sprintf'
         25        SEND_VAL                                                 '%251.18f'
         26        SEND_VAR                                                 !3
         27        DO_ICALL                                         $16     
         28        SEND_VAR                                                 $16
         29        DO_ICALL                                                 
         30      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.53 ms | 1387 KiB | 17 Q