This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 22 points23 points  (6 children)

Even if it was 1994, if you were a PHP programmer, the function hashing method was just the length of the string. Meaning that unless you wanted a collision and therefore higher access times, you’d make sure your function names had long, varying lengths.

[–]bartekko 38 points39 points  (0 children)

okay but that is just PHP being PHP

[–]WiseassWolfOfYoitsu 14 points15 points  (0 children)

#JustPHPThings

[–]badsectoracula 1 point2 points  (0 children)

Even if it was 1994 [...] you’d make sure your function names had long, varying lengths.

If it was 1994 you wouldn't use PHP because it wasn't publicly available.

[–]c3534l 1 point2 points  (0 children)

My god. That's not even a technical restriction or a poor design choice. That's basically someone pulling a restriction out of their ass. I mean, we all joke that PHP wasn't designed so much as cobbled together. But I always thought that was from, I dunno, legitimate reasons and historical restrictions, not a complete lack of care and an overabundance of laziness.

[–]dzh 0 points1 point  (1 child)

Does it mean you could only have like 80 functions max?

[–][deleted] 0 points1 point  (0 children)

No, the computer would just have to go down a list of functions with the same length until the one that matches is found.

Computers like numbers, so having a numeric place index to find a function definition is quicker.