WYSIWYG (What you see is what you get) editors are tricky because they do not place the text that you paste into your page as that text but rather an html representation of that text.
Therefore a code like:
Ends up really becoming:
Unforunately, the above will not print hello world as expected

. In order to make the editor strict, (and I am referring to dreamweaver), you have to right-click where you want the code to be inserted, click insert HTML.... and replace what pops up (<>) with the PHP code that you have (Make sure it has <? and ?> tags to begin and end it).
Then press enter and the box will disappear and it will look like you haven't done anything. However, if you open up the page in a text editor or view the code in dreamweaver, you will see that your PHP is in fact there.