3v4l.org

run code in 300+ PHP versions simultaneously
<?php const EPSILON = 1e-5; $value = 4234568424.7199998; $rounded = round($value, 2); if (abs($rounded-$value) < EPSILON) { echo $rounded; } else { echo $value; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 16
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lbd4I
function name:  (null)
number of ops:  18
compiled vars:  !0 = $value, !1 = $rounded
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_CONST                                            'EPSILON', 1.0e-5
    5     1        ASSIGN                                                   !0, 4.23457e+9
    6     2        INIT_FCALL                                               'round'
          3        SEND_VAR                                                 !0
          4        SEND_VAL                                                 2
          5        DO_ICALL                                         $3      
          6        ASSIGN                                                   !1, $3
    7     7        INIT_FCALL                                               'abs'
          8        SUB                                              ~5      !1, !0
          9        SEND_VAL                                                 ~5
         10        DO_ICALL                                         $6      
         11        FETCH_CONSTANT                                   ~7      'EPSILON'
         12        IS_SMALLER                                               $6, ~7
         13      > JMPZ                                                     ~8, ->16
    8    14    >   ECHO                                                     !1
         15      > JMP                                                      ->17
   10    16    >   ECHO                                                     !0
   11    17    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.43 ms | 1395 KiB | 17 Q