Sep
01
Posted on September 1, 2008 by Dayson Pais (PHP)

Ever wanted to quickly test out a php function or a snippet of code without actually creating a new .php file & running it on a web server? In this article we are going to discuss how to display the output of some php code and display it in a mini command window using some basic batch files.

Preview:

quick test php

Instructions:

  1. Download MyPHP.zip ( < 1 kb) & extract the zip folder to any path.
  2. Open "config.bat" in any text editor.
  3. Change the first line "PATH=C:\wamp\bin\php\php5.2.5" to the path of your php.exe (in my case, I used a WAMP installation)
  4. Double click "run.bat".

This should open "test.php" in your default php editor and display output in a small window. Now you may edit code in test.php as you need to and press any key in the output window to update itself.

This is handy when you need to quickly try out some functions related to string manipulation, loops, etc.

    Print Version    

No comments yet, your thoughts are welcome?

Post a Comment
Name:
Email:
Website:
Comments: