PHP Interview Questions and Answers
Question - 131 : - Explain the ternary conditional operator in PHP?
Answer - 131 : - Expression preceding the ? is evaluated, if it’s true, then the expression preceding the : is executed, otherwise, the expression following : is executed.
Question - 132 : - What’s the difference between include and require?
Answer - 132 : - 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.
Question - 133 : - What is PEAR in php?
Answer - 133 : - PEAR(PHP Extension and Application Repository) is a framework and repository for reusable PHP components. PEAR is a code repository containing all kinds of php code snippets and libraries.
PEAR also offers a command-line interface that can be used to automatically install "packages".