#native_company# #native_desc#

Comprehensible PHP Code Page 3

By PHP Builder Staff
on October 3, 2001

Opening and closing tags
It is always recommended that PHP code
should be enclosed within <?php and ?> tags. Though, <? and ?>
or <% and %>
can be used but they might in some cases conflict with ASP or XML tags.
Care should be taken that proper comments should be added in the code
regarding all includes (include files). Their role and importance should
be carefully explained. We should also ensure that the principle of
modularity in programs is followed. Modularity helps when we are forced
to make necessary changes in the code due to some additions or as per
the recommendations of the tester or QA.
Moreover, in case of white box testing a proper coding standard is
always helpful. For those who are not conversant with the various
testing techniques, i would like to explain that White-box testing
strategies include designing tests such that every line of source code
is executed at least once, or requiring every function to be
individually tested. Very few white-box tests can be done without
modifying the program, changing values to force different execution
paths, or to generate a full range of inputs to test a particular
function. Thus as a part of the SDLC we can’t afford to ignore the other
aspects of SDLC as well, like, designing, testing, maintenance etc.
I would thus conclude by stating that coding is not limited to
itself, but there are many other aspects that are directly or indirectly
dependent on it. So proper care should be taken while documenting the
programs. There should be a standard that should be followed.
— Sujith Nair