3v4l.org

run code in 500+ PHP versions simultaneously
<?php function h(): void { $f = -0.0; var_dump($f === 0.0); // bool(true) echo $f, "\n"; // -0 if ($f === 0.0) { $f = 0.0; // reported as assign.redundant } echo $f, "\n"; // 0 } h();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/GiSbY
function name:  (null)
number of ops:  3
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   12     0  E >   INIT_FCALL                                                   'h'
          1        DO_FCALL                                          0          
          2      > RETURN                                                       1

Function h:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 10
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
filename:       /in/GiSbY
function name:  h
number of ops:  13
compiled vars:  !0 = $f
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    4     0  E >   ASSIGN                                                       !0, -0
    5     1        INIT_FCALL                                                   'var_dump'
          2        IS_IDENTICAL                                         ~2      !0, 0
          3        SEND_VAL                                                     ~2
          4        DO_ICALL                                                     
    6     5        ECHO                                                         !0
          6        ECHO                                                         '%0A'
    7     7        IS_IDENTICAL                                                 !0, 0
          8      > JMPZ                                                         ~4, ->10
    8     9    >   ASSIGN                                                       !0, 0
   10    10    >   ECHO                                                         !0
         11        ECHO                                                         '%0A'
   11    12      > RETURN                                                       null

End of function h

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
127.74 ms | 479 KiB | 9 Q