3v4l.org

run code in 300+ PHP versions simultaneously
<?php function isEqual($a, $b, $epsilon = 1e-10) { // comparing with absolute error precission return ((float)$a - (float)$b < $epsilon) && ((float)$b - (float)$a < $epsilon); } var_dump(isEqual(0.000001, 0.000001));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/e0N6Z
function name:  (null)
number of ops:  8
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'isequal'
          2        SEND_VAL                                                 1.0e-6
          3        SEND_VAL                                                 1.0e-6
          4        DO_FCALL                                      0  $0      
          5        SEND_VAR                                                 $0
          6        DO_ICALL                                                 
          7      > RETURN                                                   1

Function isequal:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 8, Position 2 = 13
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
filename:       /in/e0N6Z
function name:  isEqual
number of ops:  15
compiled vars:  !0 = $a, !1 = $b, !2 = $epsilon
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV_INIT                                        !2      1.0e-10
    5     3        CAST                                          5  ~3      !0
          4        CAST                                          5  ~4      !1
          5        SUB                                              ~5      ~3, ~4
          6        IS_SMALLER                                       ~6      ~5, !2
          7      > JMPZ_EX                                          ~6      ~6, ->13
          8    >   CAST                                          5  ~7      !1
          9        CAST                                          5  ~8      !0
         10        SUB                                              ~9      ~7, ~8
         11        IS_SMALLER                                       ~10     ~9, !2
         12        BOOL                                             ~6      ~10
         13    > > RETURN                                                   ~6
    6    14*     > RETURN                                                   null

End of function isequal

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.62 ms | 1397 KiB | 16 Q