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); } for ( $i = 0; $i < 10000; $i++ ) isEqual(0.000001, 0.000001);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
2 jumps found. (Code = 44) Position 1 = 9, Position 2 = 2
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 2
2 jumps found. (Code = 44) Position 1 = 9, Position 2 = 2
Branch analysis from position: 9
Branch analysis from position: 2
filename:       /in/GAKTp
function name:  (null)
number of ops:  10
compiled vars:  !0 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   ASSIGN                                                   !0, 0
          1      > JMP                                                      ->7
    9     2    >   INIT_FCALL                                               'isequal'
          3        SEND_VAL                                                 1.0e-6
          4        SEND_VAL                                                 1.0e-6
          5        DO_FCALL                                      0          
    8     6        PRE_INC                                                  !0
          7    >   IS_SMALLER                                               !0, 10000
          8      > JMPNZ                                                    ~4, ->2
    9     9    > > 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/GAKTp
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:
164.18 ms | 1398 KiB | 14 Q