Skip to content

Latest commit

 

History

History
24 lines (20 loc) · 575 Bytes

0755.md

File metadata and controls

24 lines (20 loc) · 575 Bytes

Take a look at the following code

function myFunction($a) {
	$a++;
}
$b = 1;
myFunction($b);

What code do you need to replace so that $b has the value 2 at the end of the script? (May be multiple answers)

  • A) Line 01: Replace $a with &$a
  • B) Line 02: Replace $a++ with $a += 2;
  • C) Line 02: Replace $a++ with $a *= 2;
  • D) Line 05: Replace $b with &$b
Answer

Answer: A