YahooPHP Interview Question 2

Source: Internet
Author: User
Tags apd php debugger
How do you define a class of myclass with no member correspondence or features?

1. what are the differences between foo () and @ foo?
2. how do you renew your PHP application?
3. what is "=? For example, "=" is true, but "=" is true.
4. how do you define a class of myclass that does not have a letter or feature?
5. how do you generate a myclass object?

The following are the answers provided by Matt Wilkin:

1. what are the differences between foo () and @ foo?
Foo () will parse this function, and any solution operator, method operator, and line operator will be shown on the response surface.
@ Foo () when writing this function, all the preceding response messages will be hidden.
Many applications use @ mysql_connect () and @ mysql_query to hide the warning messages of mysql. I think this is a serious loss, because the hacker should not be hidden, you must properly handle them and solve them if possible.
2. how do you renew your PHP application?
I don't often do this. I have used many different diagnostic tools and it is not easy to set these tools in Linux systems. However, I will introduce a recently noticed failover tool below.
PHP-Advanced PHP Debugger or merge PHP-APD. The first step is to install the following command on the slave line:

Pear install apd

After security, add the following sentence at the beginning of your notebook to start the operation:

Apd_set_pprof_trace ();

After the renewal, open the following cases to check the daily renewal of the production line:
Apd. dumpdir
You can also use pprofp to format the daily layout.
For more information, visit http://us.php.net/manual/en/ref.apd.php.
3. what is "=? For example, "=" is true but "=" is false.
"=" Is a function that can either return a false value or return a letter that is not a false value but can contain a false value, strpos () and strrpos () are two examples.
The second part of the question is a bit difficult. it is false to think of a "=", but "=" is a real example. On the contrary, there are few examples. However, I finally found the following example:

12345678
If (strpos ("abc", "a") = true) {// This part will never be merged because the position of "a" is 0, if (strpos ("abc", "a") = true) {// This part will be deleted, because the return value of the credential strpos () cannot be converted into a distributed value .}

4. how do you define a class of myclass that does not have a letter or feature?

123
      class myclass { }

5. how do you generate a myclass object?

$ Obj = new myclass ();

There is no more simple than this one.

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.