3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = 0.1; $b = 0.2; $c = sprintf('%.1f', ($a + $b)); if ($c == 0.3) { echo "OK"; } else { echo "KO"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 12
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0Ad6A
function name:  (null)
number of ops:  14
compiled vars:  !0 = $a, !1 = $b, !2 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 0.1
    4     1        ASSIGN                                                   !1, 0.2
    5     2        INIT_FCALL                                               'sprintf'
          3        SEND_VAL                                                 '%25.1f'
          4        ADD                                              ~5      !0, !1
          5        SEND_VAL                                                 ~5
          6        DO_ICALL                                         $6      
          7        ASSIGN                                                   !2, $6
    6     8        IS_EQUAL                                                 !2, 0.3
          9      > JMPZ                                                     ~8, ->12
    7    10    >   ECHO                                                     'OK'
    6    11      > JMP                                                      ->13
    9    12    >   ECHO                                                     'KO'
   10    13    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.05 ms | 1001 KiB | 14 Q