Skip to content

Latest commit

History

History
23 lines (19 loc) 路 544 Bytes

File metadata and controls

23 lines (19 loc) 路 544 Bytes

What would you replace at line 2 // ??? with, below, to make the string 'Hello, World!' be displayed?

function myfunction() {
    // ???
    print $string;
}
myfunction("Hello, World!");
  • A) list($string) = func_get_args();
  • B) $string = func_get_arg(0);
  • C) $string = get_function_args()
  • D) $string = $argv[1];
Answer

Answer: A, B