LinkedIn PHP Skill Quiz Assessment Answers

In the following script, which line(s) will cause an error(s)?

Latest Update on 30th December, 2021 by Certification Course Answers

In the following script, which line(s) will cause an error(s)?

  1. Line 6 will cause an error because you can’t reassign a new value to a variable that has already been set.
  2. Line 7 and 8 will cause an error. Line 7 has whitespace in $will i work and should be $will_i_work. Line 8 cannot start with a number befcause it is a variable.
  3. Line 5 will cause an error because some_string should be someString.
  4. Line 3 and 4 will cause an error because a variable cannot start with an underscore(_).

Correct Answer:

  • Line 7 and 8 will cause an error. Line 7 has whitespace in $will i work and should be $will_i_work. Line 8 cannot start with a number befcause it is a variable.

Latest Updates

No posts found in this category.