on style (was mixing PHP and HTML code)

From: Date: Fri, 12 Jan 2001 20:18:24 +0000
Subject: on style (was mixing PHP and HTML code)
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-34292@lists.php.net to get a copy of this message
the main reason to follow guidelines like this is to make your code legible and modifiable. i come to PHP from HTML via Perl/CGI, and have inherited some nasty code on sites i have worked on. i've always appreciated code that is structurally formatted. Perl is notorious for its intrinsic flexiblity and default global variables, which allows for programmers to write statements that are very hard to comprehend while reading the code. this follows for other scripted languages like JavaScript and PHP. using braces and indents are a part of authoring legible code in almost any programming language, and should be exercised whenever possible if you are writing code that others will work on, or if you intend for your code to be portable. i do think that the code standard has some good elements to it, but it goes too far to specify a 4-space indent and to specify no spaces within if (condition) statements. we all benefit from writing legible code, plain and simple. DanO -----Original Message----- From: Mark Maggelet [mailto:maggelet@mminternet.com] Sent: Friday, January 12, 2001 11:40 AM To: enigma@turingstudio.com; php-general@lists.php.net Subject: Re: [PHP] mixing HTML and PHP code >http://www.binarycloud.com/code_standard.html >> >> http://marc.theaimsgroup.com/?l=php-pear&m=97603413001842&w=2 >> Best Practices: PHP Coding Style : >> http://phpbuilder.com/columns/tim20010101.php3 >> Smart Architectures in PHP : >> http://phpbuilder.com/columns/tim20001010.php3 These are all just opinions, none of these are official Php style guidelines, so there's no real reason to follow them. - Mark -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#34292) next »