[phpxmlrpc-devel] formatting and php3, etc.
Brought to you by:
ggiunta
From: Miles L. <mi...@sp...> - 2001-08-29 05:08:39
|
Hello to all (2) of you, and others who are hidden from the subscriber list. I am interested in first making sure the code is php3-compliant. We are using a modified version of this code in phpgroupware, and it was not difficult to adjust. For the most part this means replacing foreach with reset and while. Since the code is not using xml_set_object or get_class, et al, it is otherwise in good shape. Next, I would like to go through and replace all " with '. This has shown itself to improve performance noticeably. Lastly, I am interested in applying a new formatting style to the code, roughly along the lines of GNU and phpgroupware's format. Here is a brief outline: <?php class myclass { var $somevar; var $somearray( 'element1' => 'value', 'element2' => 1 ); function myclass($arg=False) { if($arg) { echo 'hello world'; } } } ?> The whitespace above are all tabs. This format helps to ensure that most people are able to view and understand it more clearly, I feel. Unbracketed if statements,etc., can be a pain to troubleshoot if you did not write the code. I know this last item will probably spark at least some debate, so I dare not touch that until I get some yeas and nays. -- Miles Lott - http://milosch.net Handspring Visor USB and BeOS FS support for Linux phpGroupWare - http://www.phpgroupware.org |