DISQUS

php programmer of bangladesh: Explain it !!!!

  • nilesh · 2 years ago
    simple , if it was -$x the its as 0-1 = -1, so

    try echo -$x + 1; will be 0
  • shakil · 2 years ago
    Dear masud I and ripon tested it.
    It actually shows 0 not -1.
    It shows -1 if you use ~$x.
    Its a bitwise binary not which negates all the bits of an integer,operates on bit level and negates all the bits of 0.

    Stay cool.
    Shakil@evoknow
  • Masud · 2 years ago
    I know that, it was actually a bug which has been fixed. Now it does as it should be. Thanks for this try and informing me that.

    hope you guys will continue to visit my blog.

    thanks