Drupal does not allow adding PHP code directly inside a post or in a block by default.
To do this, we need to activate a drupal module called PHP filter via Administer Site building Modules.

BY Best Interview Question ON 13 Jan 2019