What is the output of the following code snippet? $a = ’10’; echo $a + 5;

PHP Medium
Select the correct answer: Single Choice

Key points

  • Arithmetic operators trigger numeric type juggling
  • Strings starting with numeric characters are converted to integers or floats
  • Concatenation uses the dot operator, not the plus operator

Ready to go further?