PHP Test №2

What is the output of the following script?
$haystack = 'abcda';
$needle = 'a';
$pos = strpos($haystack, $needle);
if (!$pos) {
echo "miss";
}
else {
echo "hit " . $pos;
}
PHP is a closed source software?
$a = 3;
function Test()
{
echo "a = $a";
}
Test();
Which of the following statements best describes the @ operator when used in PHP code?
Which extension is not a correct PHP file extension?
FUNCTION TEST()
{
ECHO "PROGRAMMING SKILLS!\n";
}
test();
Consider the following PHP code:
$myArray = array(10, 20, 30, 40);

What is the simplest way to return the values 20 and 30 in a new array without modifying $myArray?
A value that has no defined value is expressed in PHP with the following keyword:
Which of the following differences are valid between php4 and php5?
What data type will PHP automatically convert the following variable to:?
$aVariable = 99;
How we submit data without a submit button?
(A)
(B)
(C)
(D)
Which of the following is used to declare a constant?
What is the default execution time set in set_time_limit()?
What will be displayed in a browser when the following PHP code is executed:
function greeting() {
echo "Welcome To Programming Skills";
}
echo "PHP Basics, ";
greeting();
Which of the following rules below are false for exceptions?
What will be printed?
$var = '0';
if ($var) {
echo 'true';
} else {
echo 'false';
}
How can we count the number of elements in an array?
What will be displayed in a browser when the following PHP code is executed:
function hobbies($hobby1, $hobby2, $hobby3) {
echo "sohan likes, $hobby2, $hobby1, and $hobby3.";
}
hobbies("Shopping", "Eatting", "Movies");
What will be the value of $var?
$var = 1 / 2;
What will be displayed in a browser when the following PHP code is executed:
function changeValue($y) {
$y = $y + 5;
}
$myNumber = 8;
changeValue($myNumber);
echo $myNumber;

Kommentieren Sie den Artikel

Bitte geben Sie Ihren Kommentar ein!
Bitte geben Sie hier Ihren Namen ein

Pruebas en línea