3v4l.org

run code in 300+ PHP versions simultaneously
<?php function floatEquals(float $a, float $b):bool{ if ($a===0.0 || $b ===0.0) { return true; } return false; } var_dump(floatEquals(0.0, 0.0)); var_dump(floatEquals(0.0, 0)); var_dump(floatEquals(0, 0.0)); var_dump(floatEquals(0, 0));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/nvWef
function name:  (null)
number of ops:  29
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'floatequals'
          2        SEND_VAL                                                 0
          3        SEND_VAL                                                 0
          4        DO_FCALL                                      0  $0      
          5        SEND_VAR                                                 $0
          6        DO_ICALL                                                 
   15     7        INIT_FCALL                                               'var_dump'
          8        INIT_FCALL                                               'floatequals'
          9        SEND_VAL                                                 0
         10        SEND_VAL                                                 0
         11        DO_FCALL                                      0  $2      
         12        SEND_VAR                                                 $2
         13        DO_ICALL                                                 
   16    14        INIT_FCALL                                               'var_dump'
         15        INIT_FCALL                                               'floatequals'
         16        SEND_VAL                                                 0
         17        SEND_VAL                                                 0
         18        DO_FCALL                                      0  $4      
         19        SEND_VAR                                                 $4
         20        DO_ICALL                                                 
   17    21        INIT_FCALL                                               'var_dump'
         22        INIT_FCALL                                               'floatequals'
         23        SEND_VAL                                                 0
         24        SEND_VAL                                                 0
         25        DO_FCALL                                      0  $6      
         26        SEND_VAR                                                 $6
         27        DO_ICALL                                                 
         28      > RETURN                                                   1

Function floatequals:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 47) Position 1 = 4, Position 2 = 6
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 8
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
filename:       /in/nvWef
function name:  floatEquals
number of ops:  11
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    6     2        IS_IDENTICAL                                     ~2      !0, 0
          3      > JMPNZ_EX                                         ~2      ~2, ->6
          4    >   IS_IDENTICAL                                     ~3      !1, 0
          5        BOOL                                             ~2      ~3
          6    > > JMPZ                                                     ~2, ->8
    7     7    > > RETURN                                                   <true>
    9     8    > > RETURN                                                   <false>
   10     9*       VERIFY_RETURN_TYPE                                       
         10*     > RETURN                                                   null

End of function floatequals

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.97 ms | 1009 KiB | 18 Q