-- Vladas Diržys <[email protected]> wrote
(on Thursday, 17 November 2011, 02:42 PM +0100):
> wondering if Zend Framework coding style says that multiline strings
> should be concatenated or it just says that if this string is
> concatenated, it should be done in a certain style?
> 
> Basically, is following allowed?
> 
>    1. $sql = "SELECT `id`, `name` FROM `people`
>    2.         WHERE `name` = 'Susan'
>    3.         ORDER BY `name` ASC ";
> 
> 
> Or should it be always like this?
> 
>    1. $sql = "SELECT `id`, `name` FROM `people` "
>    2.      . "WHERE `name` = 'Susan' "
>    3.      . "ORDER BY `name` ASC ";

We typically recommend the second format, or the usage of
heredocs/nowdocs (latter is PHP 5.3 only, though). However, our CS does
not dictate either way.

-- 
Matthew Weier O'Phinney
Project Lead            | [email protected]
Zend Framework          | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

--
List: [email protected]
Info: http://framework.zend.com/archives
Unsubscribe: [email protected]


Reply via email to