I'm looking for a place online where I can type in my code and then see the result. Is there some tool or website like this?
I don't know any place that would let a random person execute PHP code through the browser, there are better options. You could always download PHP and Apache, and MySQL if you want to play with that, onto your PC and install it. Pretty simple process and you can do anything you wish right on your local PC. Or, sign up for some cheap $1.99 hosting account somewhere and play on that.
It would be highly dangerous if there were, I suggest you install a LAMP on your computer. http://apache2triad.net http://www.apachefriends.org/en/xampp.html
www.apachefriends.org download and install then run xampp and viola, instant local webserver running php, mysql, and apache.
Take a look at PHP interactive. It's described as "a web based interactive shell for PHP" where you can type code in a text area, click the "update" button, and you can see the results of your code. http://www.hping.org/phpinteractive/ Just don't forget that you've got to secure it or else it could end up being a PHP free for all.
If you want a lighter personal web server for your PC, get EasyPHP, the interface is easier for beginner than XAMPP (IMHO). When you ready to go more advanced, XAMPP is absolutely a good choice.
Install http://www.appservnetwork.com/ and you get Apache 2.0.59 PHP 4.4.5 MySQL 5.0.27 phpMyAdmin-2.9.2 Also a good php editor here http://www.dzsoft.com/dzphp.htm
well if you get apahe on yor computer then you can test the scripts you right on your computer the thing is most things will load super fast because its not over your internet line. Also quotaless(dot)com gives you lots of space and database stuff and allows you to write your scripts in and stuff like that.