How to understand PHP is primarily an array of operations of the language, or how to use the correct and reasonable array?
Reply content:
How to understand PHP is primarily an array of operations of the language, or how to use the correct and reasonable array?
In a strongly typed programming language, there is a dedicated data structure solution. Typically, you create a container in which you can store any type of data, and you can determine the container's capacity based on the data stored in the container, hitting a container structure that can be long, such as linked lists, stacks, and queues, which are commonly used in data structures. in PHP, it is common to use arrays to accomplish the work of other languages using data structures.
Landlord, who told you that PHP is the main operation of the array of languages, PHP left the database can do nothing, those who mislead you hateful.
Landlord question, in itself there is a misunderstanding. I don't think PHP is "basically a manipulation of the array of languages"
1. The cause of this misunderstanding may be that the array of PHP can be summed up as a--key value array. Unlike other languages, you need to differentiate between a linked list or a dictionary or an indexed array.
2. If the word "primarily an array of operations" is established, then other languages are established. In addition to manipulating arrays, they also manipulate strings and manipulate operations.
3. I think, whether it is PHP or other languages, it is certainly the language of the data structure + algorithm . So use an array to describe the data structure, or use object-oriented to describe the data structure, or use a string (such as json,xml) to describe it. All right.
This could be another kind of fallacy about PHP's powerful array functionality.
Each language has such an array of concepts, how can I say that PHP is a major operating array of languages? Can only say that the array is very flexible, very powerful, it is one of the PHP data type. Python also has its list, the meta-ancestor, the dictionary, also very important.
The array of PHP is very powerful, but so to speak, it looks a little ...
An array of PHP is just a convenient way for us to organize data in a reasonable structure. PHP capable of a lot of things you go to see swoole this PHP extension