If the sultan in 1001 nights was a programmer, call me Scheherazade, because I can tell a lot of stories why I hate PHP.

Tonight's story: func_get_args

I checked the function arguments eight times, every time thinking it doesn't take any arguments, so this cannot be the right function. But PHP allows to hide argument in the middle of the method. I don't want to read the whole function to figure out what's happening. Plus, functions are far too long. Can't we channel our inner Robert C. Martin a little more?

  • 3
    I could do with less PHP. But I'd prefer more Fowler, Stroustrup, Knuth, MacDonald, and a hundred others to more Martin.
  • 2
    ++ for 1001 nights though
  • 0
    @SortOfTested i read Martin and thought of Fowler immediately for some reason. (Don't know Robert C.) Guess each his own.

    I don't think it's much of an issue of the language but more of idiot who programmed the function. I guess the variadic functions in other languages are a bit clearer in the synopsis so I will give you that. Any moron who does not put it in a docblock or handle arguments asap should be shot down as a programmer with well infinite arguments of incompetence.
Add Comment