89
BunnyT
5y

Ah, PHP's misleading function names.

Comments
  • 17
    It turns out I still dislike PHP.
    Surprise!
  • 3
    😂😂😂 gotta love PHP’s documentation as well, went to look for the JSON error codes as integers, but they only list their constant error codes, but not the actual error code as integer. Their documentation is full of hidden gems
  • 2
    @err-occured dude specially in the comments 🤣🤣 most of us devs that work with php get our documentation from other places because of the weird fuckeru that we find inside the php docs from time to time.
  • 1
    @AleCx04 same here 🤣 some of the comments are helpful in the PHP documentation, and some are just attempts at refactoring the PHP docs.

    Really we all know StackOverflow is the programmers true source of documentation. 😂
  • 3
    I'd think that could be because its not using resources which would guarantee at least a quite strong (pseudo) randomness. (Because those resources are too heavy for a simple unique id I'd think)
    (I'm not an expert at this)

    But next to that, its random so it could technically return the same number multiple times.
  • 7
    No UUID can guarantee uniqueness, but collisions are incredibly rare. Like, never will ever happen levels of rare.
  • 1
    @TheCommoner282 I didn't read it at all before answering but this is a general thing and nobody else mentioned it haha but thanks for checking!
  • 2
    One time while reading the php documentation m I had mistakenly had the language set to German (took 5 years of German and was deep into finding thought I did not notice at first).

    Switched to English after I realized the setting and it made less sense.

    I really do think the documentation is badly translated from German to other languages.
  • 1
    i maintain that you can very precisely judge programmer's proficiency in php by how much he hates it.
  • 2
    @err-occured why would you need the integer value of the constants? That defeats the purpose of named constants, and is against the clear code idea.

    It's not even hard to find out the integer values. Just echo them...

    PHP docs are one of the better ones. For example, node.js docs are several levels of worse.

    ‐---------
    Also, blaming a lightweight function for anything is funny. Just use a stronger function. I agree it could have been named better, but this function is old.
  • 1
    I'd be more worried if it guaranteed uniqueness tbh :)
Add Comment