What are the differences in embedding PHP code in Joomla 1.6 compared to Joomla 1.1?

In Joomla 1.6, the method of embedding PHP code has changed compared to Joomla 1.1. In Joomla 1.6, it is recommended to use the JHTML class to embed PHP code within Joomla templates or extensions. This ensures better security and compatibility with future Joomla updates.

// Joomla 1.6 method of embedding PHP code using JHTML
echo JHTML::_('content.prepare', '<?php echo "Hello, World!"; ?>');