Multiple Lines of PHP Code in AppleScript with do shell script

Is it possible to do integrate a fully PHP script into AS and perform it with »do shell script«?
E.g.

set myAdd to 5
set myCode to ¬
"
#! /usr/bin/php
<?php
$myVar = \"Hello World\";
$myCounter = 5;

echo $myVar . ($myCounter + " & myAdd & ") . \"\\n\";
?>
"

set myResult to do shell script "/usr/bin/php \"" & myCode & "\"" & return

I’ve tested it, but it doesn’t work, because the shell gets multiple returns and »thinks« that each line is a seperate command line. Is there a way?

Cheers
Tobias

AppleScript: 1.10.7
Browser: Safari 523.12.2
Operating System: Mac OS X (10.4)

This works on Leopard, not sure about Tiger though.

set myAdd to 5
set myCode to ¬
	"$myVar = \"Hello World\";
$myCounter = 5;
echo $myVar . ($myCounter + 5) . \"\\n\";"

set myResult to do shell script "/usr/bin/php -r '" & myCode & "'"

Thanks, James! Now it works!

Tobias

No problem, glad to be of help =)