Often forget the function parameter location

Source: Internet
Author: User
Many PHP functions often forget the function parameter location.
There are several function parameters, but the function knows,
However, after a while, I always forget the function parameter location.

Such as strpos (string, find)
Or
Strpos (find, string)
Wait ......


Is this the case?


Reply to discussion (solution)

Yes, it's normal. It's hard to remember so many functions in php. I can't do it anyway.
But it doesn't matter. you can check the function name.

It's normal!
Do not use unfamiliar functions. check the manual whenever you have.
However, tests are also common.
Echo strpos ('abcd', 'C'), ':', strpos ('C', 'ABCD ');
Who is right?

This is what everyone would do.
Php did not take this into consideration step by step,

If the subject can be placed first,
Just like the parameter location =...
Strpos (string, find)
Str_replace (string, find, replace)
In_array (array, value)
...

This is mainly because some functions are directly derived from the C library and there is no overload mechanism.
In addition, extensions are written independently by different php enthusiasts, so they must stay in their own habits.

The only way to solve the same problem is to discard the support for library functions and change them to objects.
But this is not php but java.

This is mainly because some functions are directly derived from the C library and there is no overload mechanism.
In addition, extensions are written independently by different php enthusiasts, so they must stay in their own habits.

The only way to solve the same problem is to discard the support for library functions and change them to objects.
But this is not php but java.

Also, it is estimated that there is no way.

You can define an object using _ call.
Rewrite all original functions ......, But it's just a joke.



IDE indicates no pressure...

Hahahaha

IDE indicates no pressure...

Hahahaha

Newnew

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.