Jump to content

Have you ever confused the php functions syntaxes?


Recommended Posts

Hey :)

 

Some functions that maybe look like each other, has different place of arguments.

for example :

 

in_array("find",$array) .  find is first, the array is second.

strpos ($string, "find") ,  find is last, string is first.

 

I remember after a while, I gotta check them in php.net which is which.

any logic behind these places of arguments?

That's one of the reasons that a decent IDE helps so much; shows you the function prototype as you type the function

 

Indeed. I know its not exactly an IDE but I wish vim could do this. The best Iv'e got is to hold CTRL-1 whilst over a function name and have a shell script lookup the function in the manual for me.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.