The best way to learn a new programming language is to learn by comparison. Let's take the python scripting language as an example.1. Understand the basic data types, basic syntax and writing habits of the languageBasic data types:python:Integer, Float String Boolean Null Variable Constant, List Tuple Dictionary CollectionPHP:Boolean, String, Integer, Float, Compound Types (Arrays, Objects, Resource Types)Basic syntax and structure: conditional judgments, loops, functions, object-oriented or notWriting habit: Compared to php, replace curly brackets with indentation, remove semicolons at the end of each line2. Learn basic string processing functions (find and replace, truncate and splice)python's find, join, split, replace,php's strpos, str_replace, str_split, etc.3. Learn basic array processing functions (count, insert, delete, intercept)python's len, insert, del, slice operations, etc.,php's count, array_push, array_pop, array_slice, etc.4. Understand the object-oriented or functional programming features of the language, mainly inheritance, polymorphism and anonymous functionspython
php
python anonymous function
php anonymous function
5. Understand exceptions, error handling, assertions, logging, debugging methods, and unit testingpython exception
php exception
Assertions are mainly used in unit testing and will not be introduced here6. Understand basic input and output and file processing, input and output stream classespython:
php:
7. Understand how the language makes callback method callspython
php
8. Familiar with serialization and deserialization, the role of serialization and deserialization is to transfer objects between different platforms;python
php
9. Understand the organization mechanism of program code and executable code, runtime module loading, symbol lookup mechanismpython's import and php's autoload10. Familiar with and strengthen the thread, concurrent and asynchronous call mechanism, familiar with common frameworks and libraries11. If it is a scripting language, you need to understand its life cycle, and if it is another language, memory management is the top priority.In fact, the best way to learn is to practice, and applying what you learn is the fastest way to advance.