Function names in php, how to memorize them?

Asked

Viewed 95 times

1

I’ve tried to remember the name of several functions in php for a long time, but there’s no way, I forget everything.

"This function is all together or has an underline?"

Examples:

ucfirst ou uc_first?
strval ou str_val?

There are also functions that get quite difficult to memorize just by deducing your writing in English like:

ltrim
strcasecmp
strcoll
strtr

I was wondering if you had any tips on how to learn them more easily....

  • 2

    Although it seems I have my doubts if this is really a question about programming. It’s more of a memorization problem and the website is not full of neuroscientists or other professionals who work with it. Any answer will be the opinion of a layman. I could say, for example, to use them often even if artificially, will end up decorating.

  • Ah, finally someone questioned about this inconsistency of PHP!

  • 2

    Unfortunately there is no standard type for both function names and parameter order. Ideal is to use an auto-complete IDE and always have the PHP manual nearby.

  • 2

    I’ve been dealing with php since 2000. Until today I get confused about the order of the function parameters... rsrsr and I never remember for sure if strpos is together or str_pos separately, for example.. in doubt just type in google... I think it’s silly to want to decorate everything.. That’s what the manual is for.

  • It’s up to you. If you think it’s easier to write my Pathcreator() hi Mfccav() or Mypathcreator() or Myworks_path_creator(), it doesn’t matter. The only problem is the number and values of the parameters, and remember the name. For this, the only solution is to have a documentation 'on paper'.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.