Re: [PHP-DEV] Re: [PHP-CVS] cvs: php4 /pear DB.php /pear/DB common.phpmysql.php From: Sebastian Bergmann (sb <email protected>)
Date: 12/04/00

Chuck Hagenbuch wrote:
> > - $pdata = &$data[$i];
> > + $pdata = &$data[ $i ];
>
> Please stop making changes like this in the absence of a coding
> standards convention.

  FIne with me.

> I find the form which you removed much more readable, and I'd
> really rather not see existing code creep in any particular
> direction unless we decide on a standard and convert everything to it.

  Agreed, but are you really telling me that

        function connect(&$dsn, $persistent = false) {
                if (is_array($dsn)) {
                        $dsninfo = &$dsn;
                } else {
                        $dsninfo = DB::parseDSN($dsn);
                }
                if (!$dsninfo || !$dsninfo['phptype']) {
                        return $this->raiseError();
                }

  is more readable as

    function connect( &$dsn, $persistent = false )
    {
      if( is_array( $dsn ) )
      {
        $dsninfo = &$dsn;
      }

      else
      {
        $dsninfo = DB::parseDSN( $dsn );
      }

      if( !$dsninfo || !$dsninfo[ 'phptype' ] )
      {
        return $this->raiseError();
      }

  ?

-- 
  <? print implode( "", array_reverse( preg_split( "//", "dlrow laer "   .
  "eht ot emoclew" ) ) ); /* visit http://www.sebastian-bergmann.de/ */ ?>

-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>