gs gs107 PHP Functions - PHP Functions - Quiz No.2
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 b() { echo "b is executed"; } function a() { b(); echo "a is executed"; b(); } a(); ?>
<?php function sum($x, $y) { $z = $x + $y; return $z; } echo "5 + 10 = " . sum(7,13) . "<br>"; echo "7 + 13 = " . sum(2,4) . "<br>"; echo "2 + 4 = " . sum(5,10); ?>
5 + 10 = 15 2 + 4 = 6 7 + 13 = 20
7 + 13 = 20 5 + 10 = 15 2 + 4 = 6
5 + 10 = 15 7 + 13 = 20 2 + 4 = 6
5 + 10 = 20 7 + 13 = 6 2 + 4 = 15
<?php function addFive($num) { $num += 5; } function addSix(&$num) { $num += 6; } $orignum = 10; addFive( &$orignum ); echo "Original Value is $orignum<br />"; addSix( $orignum ); echo "Original Value is $orignum<br />"; ?>
Original Value is 15 Original Value is 21
Original Value is 15 Original Value is 21
Original Value is 15 Original Value is 15
<?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 one() { echo " this works"; function two() { echo "this too works"; } } one(); two(); ?>
<?php function one() { define("const","I am awesome!"); echo constant("const"); } one(); ?>