gs gs107 PHP Functions - PHP Functions - Quiz No.6
gs gs107 PHP: Hypertext Preprocessor Quiz
This quiz belongs to book/course code gs gs107 PHP: Hypertext Preprocessor of gs organization. We have 73 quizzes available related to the book/course PHP: Hypertext Preprocessor. This quiz has a total of 10 multiple choice questions (MCQs) to prepare and belongs to topic PHP Functions. NVAEducation wants its users to help them learn in an easy way. For that purpose, you are free to prepare online MCQs and quizzes.
NVAEducation also facilitates users to contribute in online competitions with other students to make a challenging situation to learn in a creative way. You can create one to one, and group competition on an topic of a book/course code. Also on NVAEducation you can get certifications by passing the online quiz test.
<?php function colour() { $colors = array("red", "green", "blue", "yellow"); foreach ($colors as $value) { echo "$value <br>"; } } colour(); ?>
red green blue yellow
green blue yellow red
red blue yellow green
red green yellow blue
<?php function addFunction($num1, $num2) { $sum = $num1 + $num2; return $sum; } $return_value = addFunction(10, 20); echo "Returned value from the function : " .$return_value ?>
<?php function time($string) { echo strtr("Towe Pa55", "ow5", $string); } time("ims"); ?>
<?php function constant() { define("GREETING", "Welcome to Narnia"); echo greeting; } ?>
<?php function constant() { define("GREETING", "Welcome to Narnia",true); echo greeting; } ?>
<?php function start($string) { if ($string < 45) return 20; else return 40; } $t = start(90); if ($t < 20) { echo "Have a good day!"; } else { echo "Have a good night!"; } ?>
<?php function case() { ECHO "Hello World!<br>"; echo "Hello World!<br>"; EcHo "Hello World!<br>"; } case(); ?>
Hello World! Hello World!
Hello World! Hello World! Hello World!
<?php function string() { echo strstr("Hello world!", 111); } string(); ?>
<?php function CalAll($x,$y) { echo ($x + $y); echo "<br>"; echo ($x - $y); echo "<br>"; echo ($x * $y); echo "<br>"; echo ($x / $y); echo "<br>"; echo ($x % $y); } $x = 10; $y = 6; CalcAll(); ?>
4 60 1.6666666666667 4 16
16 4 60 1.6666666666667 4
4 16 4 60 1.6666666666667
1.6666666666667 4 16 4 60