91) In PHP, objects are they passed by value or by reference?
In PHP, objects passed by value.
92) What does accessing a class via :: means?
:: is used to access static methods that do not require object initialization.
93) How is the ternary conditional operator used in PHP?
It is composed of three expressions: a condition, and two operands describing what instruction should be performed when the specified condition is true or false as follows:
Expression_1?Expression_2 : Expression_3;
94) What is the function func_num_args() used for?
The function func_num_args() is used to give the number of parameters passed into a function.
95) If the variable $var1 is set to 10 and the $var2 is set to the character var1, what's the value of $$var2?
$$var2 contains the value 10.
96) How is it possible to cast types in PHP?
The name of the output type has to be specified in parentheses before the variable which is to be cast as follows:
* (int), (integer) - cast to integer
* (bool), (boolean) - cast to boolean
* (float), (double), (real) - cast to float
* (string) - cast to string
* (array) - cast to array
* (object) - cast to object
97) When is a conditional statement ended with endif?
When the original if was followed by: and then the code block without braces.
In PHP, objects passed by value.
92) What does accessing a class via :: means?
:: is used to access static methods that do not require object initialization.
93) How is the ternary conditional operator used in PHP?
It is composed of three expressions: a condition, and two operands describing what instruction should be performed when the specified condition is true or false as follows:
Expression_1?Expression_2 : Expression_3;
94) What is the function func_num_args() used for?
The function func_num_args() is used to give the number of parameters passed into a function.
95) If the variable $var1 is set to 10 and the $var2 is set to the character var1, what's the value of $$var2?
$$var2 contains the value 10.
96) How is it possible to cast types in PHP?
The name of the output type has to be specified in parentheses before the variable which is to be cast as follows:
* (int), (integer) - cast to integer
* (bool), (boolean) - cast to boolean
* (float), (double), (real) - cast to float
* (string) - cast to string
* (array) - cast to array
* (object) - cast to object
97) When is a conditional statement ended with endif?
When the original if was followed by: and then the code block without braces.
98) How is a constant defined in a PHP script?
The define() directive lets us defining a constant as follows:
define ("ACONSTANT", 123);
99) How can you pass a variable by reference?
To be able to pass a variable by reference, we use an ampersand in front of it, as follows $var1 = &$var2
100) Will a comparison of an integer 12 and a string "13" work in PHP?
"13" and 12 can be compared in PHP since it casts everything to the integer type.