testing.thumbnail

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 filegetcontents 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:Reworkmobshare>php -a Interactive mode enabled**** **for($i=0;$i<10;$i++) { echo $i.'
'; } 0
1
2
3
4
5
6
7
8
9
**