Java programmers learn php 2

Source: Internet
Author: User
: 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.

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.