PHP 面试题与答案
Test your skills through the online practice test: PHP Quiz Online Practice Test
相关差异对比
问题 21. What does a special set of tags <?= and ?> do in PHP?
The output is displayed directly to the browser.
这有帮助吗?
添加评论
查看评论
问题 22. What's the difference between include and require? -
It's how they handle failures. If the file is not found by require(), it will cause a fatal error and halt the execution of the script. If the file is not found by include(), a warning will be issued, but execution will continue.
这有帮助吗?
添加评论
查看评论
问题 23. I am trying to assign a variable the value of 0123, but it keeps coming up with a different number, what's the problem?
PHP Interpreter treats numbers beginning with 0 as octal.
这有帮助吗?
添加评论
查看评论
问题 24. Would I use print "$a dollars" or "{$a} dollars" to print out the amount of dollars in this example?
In this example it wouldn't matter, since the variable is all by itself, but if you were to print something like "{$a},000,000 mln dollars", then you definitely need to use the braces.
这有帮助吗?
添加评论
查看评论
问题 25. How do you define a constant?
Via define() directive, like define ("MYCONSTANT", 100);
这有帮助吗?
添加评论
查看评论
用户评价最有帮助的内容:
- What does a special set of tags <?= and ?> do in PHP?
- What's the difference between include and require? -
- I am trying to assign a variable the value of 0123, but it keeps coming up with a different number, what's the problem?
- How do you define a constant?
- Would I use print "$a dollars" or "{$a} dollars" to print out the amount of dollars in this example?