: This article mainly introduces java programmers to learn php 2. if you are interested in the PHP Tutorial, refer to it. I am a web developer who learns a language. It is the general syntax. when the specific syntax is added, then CRUD is used by the plug-in.
Which of the following are the weak types of $ bianliang. php in php syntax. Although there are classes but not object-oriented, function is not a method. So the call method $ obj-> fun (). No [.] is called.
1. constructor
Function _ construct () {}pay attention to two underlines
2. subclass calls the parent class (this is not like java calls the parent class by default)
Parent: :__ construct (6, 10 );
3. there is also a special hook method (not very useful, it is a feature)
Function _ destruct (){
}
Several other special methods
4. include ("") // similar to jsp import
5. require and include are almost identical, except for different methods of handling failures. Require generates an E_COMPILE_ERROR level error when an error occurs. In other words, this will cause the script to stop and include will only generate warnings (E_WARNING), and the script will continue to run. (Very common)
6. define ('','') defines the name before a constant, followed by a value (very common );
The above introduces the java programmer to learn php 2, including some content, hope to be helpful to friends who are interested in PHP tutorials.