How can we master PHP arrays and string functions?

Source: Internet
Author: User
Php Chinese network (www.php.cn) provides the most comprehensive basic tutorial on programming technology, introducing HTML, CSS, Javascript, Python, Java, Ruby, C, PHP, basic knowledge of MySQL and other programming languages. At the same time, this site also provides a large number of online instances, through which you can better learn programming... Reply: PHP arrays and string APIs should be the most anti-human APIs in all class C languages. Check the manual. I will try more ...... The query is fast. First, repeat all arrays and string functions to find out what problems they can solve.
Then, when you need to use some functions in the project, check the manual and check the functions mentioned in the manual.
After a period of accumulation, you will be familiar with these functions.
If you are free, you can try to implement these functions by yourself. Generally, you will write code that is more efficient than the default implementation.
You will find that it is actually the same as remembering words, isn't it? Use more, remember frequently, and check the manual at any time. if you cannot remember it, use zend. a prompt is displayed ~ If you are still proficient and cannot think about how to work together, it is hard to find a manual. PHP: Arrays-Manual
PHP: Strings
When bringing people, I will charge them and read array-related functions one by one.

Neither list nor dict are a feature of PHP.
If your world view is not purely binary like some people, you must describe your shortcomings or advantages.

Some people may say, "If this is a strong type, it won't be so troublesome." Others may say, "If this is a weak type, it won't be so troublesome ", of course, we all know that any feature has its own purpose. under certain conditions, it will gain additional benefits and pay a price accordingly.
The array in PHP is intentionally designed to be like this. it is only the author's consideration based on the PHP application scenario, not a mistake made because the author does not know list and dict. PHP has many historical errors, such as array_map () and array_filter (). both of them are about array functions and both require callback and array parameters, however, the order of parameters is reversed. I mean, there is an error in array_map/array_filter, but the array itself is not an error. The author just wants to lower the threshold for getting started and reduce the amount of code in some cases. the side effect is to reduce efficiency and sometimes confuse users.

It may be far away, but I still want to post my previous comments on PHP
One of the main reasons for the popularity of PHP is that the language is cheap. if I want to test the average IQ of developers in all languages, the average IQ of PHP developers should be the lowest. But this is by no means an offense to anyone. to admit that he is popular, you must admit that this is because even people with an IQ of 90 dare to try to write a Framework for PHP to make it so popular. this is a fact, it has nothing to do with who a specific user is and how to use it. I first learned the fact that the basic libraries of almost all other languages are written in the same language, but the basic library of PHP depends on C. Last year, I saw an article saying that PHP is not a language. I deeply agree that the position of PHP is actually between pseudocode and programming language. it features fast and cheap. you can quickly build a prototype, you can find a group of migrant workers to write when you need them. this language is of course amazing. One of the biggest revelations from hacking and painter is that although I understand that optimization is the source of all evil, it is easy to stick to details when writing code, at present, the most annoying thing is that the code is not pseudo-coding enough when we make the first version of an application. You are a programmer, you are a painter, and you need to make a program run at the fastest speed. Drawing a popular painting is what programmers do. it is what engineers do to print the painting into countless points and sell it all over the world. When facebook's website is running, why can't we find someone in the world to improve memcache's pecl to save tens of thousands of machines.
And I didn't understand how PHP is used very differently until just now.

I want to tell the landlord that PHP, as the most widely used language in the Internet industry and the most frequently ridiculed language, has many characteristics, these features have created the status and reputation of PHP, which can be viewed every time according to the PHP Manual. then, you can find some functional code to write it. You need to be familiar with the functions and usage of arrays. now, the general IDE has these function libraries, which can be configured and used upon query.
No shortcuts to proficiency, only repeated use and exercises! Read the fuck manual, and comment to write more code. you can read the manual to see the code of some excellent programs and what you need to write. in addition to writing more code, you need to do more... no other effective methods can be found. when you encounter an array or string to be processed, search the internet to see if there are similar functions.

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.