Where Can I Test PHP Code Online

Sitepoint Members,
Where can I test PHP code online. The one site I found gives error messages I can’t understand.

Thanks,

Chris

The ideal would be to get your own hosting, which can cost as little as a few dollars a month. Or you could set up a server environment on your own computer, using something like WAMP (PC) or MAMP (Mac), both of which are free.

Ralph,
I forgot to think of “validator”. I found a php validator.

PHPLint on-line

Thanks,

Chris

Which is an okay tester for syntax of an individual file. *AMPing it is usually better for testing purposes (and faster than having to FTP to a remote site constantly :wink: ), because you have direct access to php.ini and can turn error reporting on by default.

Why not get yourself some free webspace with the likes of X10Hosting or 000Webhost, both have good support forums to answer any technical problems you may encounter.

Not so sure about that. You still have to create a file, name it, save it, type in the address manually in the browser etc. Most programmers are inherently lazy so it’s best to use a site like:
Free PHP test - free php code testing online. -
Test run php code online, right here - WriteCodeOnline.com/PHP

Just type and go!

Get the best of both worlds, PHP Interactive - an interactive shell for PHP an interactive shell you install on your own machine.

Used it for years, where I do most much of working out when replying here. Sometimes you don’t want to pollute your IDE with snippets of code.

Again; Run PHP code.

Run this.
<?php
include_once(‘config.php’);
include_once(‘functions.php’);
include_once(‘header.php’);

//300 lines of code
?>

Now find me the errors in my code and make sure it comes out with the correct values. :wink:

“You still have to create a file, name it, save it, type in the address manually in the browser”

And in your example you still have to create a file type in the address manually in your browser…
and now you have to make it flat, not connect to any database that isnt open to the world connecting to it, have to comply to their server’s modules, etc…

Far more work than just coding the thing and actually running it, imo. But if thats what works for you, by all means go for it.

I seen an awesome demo of this (BeachPHP) at [URL=“http://conference.phpnw.org.uk/phpnw10/”]PHPNW10, brilliant.

The op asked where they could test php code. Not an entire php system :smiley:

When I want to test a bit of code that is reliant on other files, variables etc, i just manually set them up instead and then run the trial code to see how it works with the variables. It’s not hard is it.

Trycodeonline.com is the place which you are searching for, here you can test your code online or you can save the code for future reference or to share with your friends

writecodeonline.com/php is the site to test php code.