Drupal 7 and below came with an optional module you can use in your input formats - the "PHP Filter". This allows you to put PHP code into the content of your webpages, and Drupal will process the PHP before rendering the page.
Earlier this week, I got several automated e-mails from Drupal sites I manage. The e-mails told me that some of the modules I use had a new version, so I was advised to log in and upgrade.