What is the result of the following code snippet? $a = 10; echo gettype($a);

PHP Intermediate Easy

PHP Intermediate — Easy

What is the result of the following code snippet? $a = 10; echo gettype($a);

Key points

  • gettype() returns a string representation
  • Integer values return 'integer'
  • Type names in code differ from gettype() output

Ready to go further?

Related questions