Aug 15 2007

PHP Testing

php testing

PHP Testing >>

The main problem i faced during php programming the lack of quick testing.
For Example if i want to test the function substr(), how this is working, or
what is the result of file_get_contents function, or sometimes we see new php
functions from different websites. If you wanna test , you write php code on
file and save as php file and put into your web root and check via browsers.

But there is a simple way to test php functions from shell or a command line
(cmd) . What you want to do is, add the path of your php.exe in your shell/
cmd PATH variable. After that type

php -a

from command line or shell, you will get php in interactive
mode. Just type your php codes and see the result on time. No need to use a
browser or webserver to check your php code.

E:\Rework\mobshare>php
-a
Interactive mode enabled

<?php
echo ‘hai’;
hai

for($i=0;$i<10;$i++)
{
echo $i.’<br>’;
}
0<br>1<br>2<br>3<br>4<br>5<br>6<br>7<br>8<br>9<br>

TAGS:

LEAVE A COMMENT

Subscribe Form

Subscribe to Blog

Sponsors

    Advt on sajithmr.com
    Advt on sajithmr.com
    Advt on sajithmr.com
    Itslife Online

Recent Comments

  • Binny V A: Thanks for the post - love the picture ;-)
  • TheAnand: A lot of people are seeing errors with google video chat….is there any other software which has to be...
  • Alex: Wow, interresting analysis you have done! I’m trying to run GoogleVoiceAndVideoSetup on linux, using...
  • Mella Fitriansyah: Nice plugin, I will try to add this plugin in my blog…
  • Mella Fitriansyah: Nice Info, Sir i will reading your another post success for you

Recent Readers

JOIN MY COMMUNITY!

Recent Posts