PHP Interview Practice #3

Q1. Which of the following variable name is invalid?







Q2. Which of the following is used to add a value to the end of an array?







Q3. What will be the output of the following program?

$var1 = "Programming";  
$var2 = "Path";  
echo "$var1$var2";






Q4. Which of the following function is used to convert all string to uppercase?







Q5. Which of the following function is used to convert only first word of the string to uppercase?







Q6. What will be the output of the following code?

echo "Welcome" . "to" . "the" . "Programming Path";  






Q7. Which version of PHP introduced Try/catch Exception?







Q8. What will be the output of the following php code?

$var1 = 15;
$var2 = 20;

print $var1. '+'. $var2;






Q9. In which year php was created?







Q10. which of the following is new operator added in PHP 7?