Skip to content

Latest commit

 

History

History
21 lines (17 loc) · 568 Bytes

0702.md

File metadata and controls

21 lines (17 loc) · 568 Bytes

What is the output of the code below ?

$a = ['one'=>'php', 'two'=>'javascript', 'three'=>'python'];
$b = ['python', 'javascript', 'php'];
echo (array_values(array_reverse($a)) === $b) ? 'true' : 'false';
  • A) true
  • B) Fatal error: Can't use function return value in write context
  • C) false
  • D) Fatal error: function array_values does not exist
Answer

Answer: A