I am a web developer and learning a language. It's just the general syntax, plus specificity, and then CRUD, plug-in usage.
Let’s talk about the main ones in php syntax, $bianliang .php weak type. Although there are classes, they are not object-oriented. They are functions, not methods. So the calling method $obj->fun(). has no [.] call.
1. Constructor method
function __construct(){} Pay attention to the two underscores
2. The subclass calls the parent class (unlike java which calls the parent class by default)
parent::__construct(6,10);
3. There is also a special hook method (not very useful, it’s a feature)
function __destruct(){
}
Let’s talk about a few more special methods
4.include("") //Similar jsp import
5.require and include are almost exactly the same, except In addition to handling failure differently. require generates an E_COMPILE_ERROR level error on error. In other words, it will cause the script to abort and include will only generate a warning (E_WARNING), and the script will continue to run. (Very commonly used)
6.define (‘’, ‘’) Define a constant preceded by a name, followed by a value (very commonly used);
The above introduces Java programmers to learn PHP II, including aspects of content. I hope it will be helpful to friends who are interested in PHP tutorials.