What Will Be The Output Of The Following Php Codep Pre Langphp #670
What will be the output of the following PHP code?</p> <pre><code class="language-php" line="1"> <?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 />"; ?> </code></pre>
This multiple choice question (MCQ) is related to the book/course gs gs107 PHP: Hypertext Preprocessor. It can also be found in gs gs107 PHP Functions - PHP Functions - Quiz No.2.
What will be the output of the following PHP code?
<?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
None Of The mentioned