On Fri, Oct 14, 2011 at 08:08:56PM +0200, Arnaud Le Blanc wrote: > Hi, > > I've already posted this patch and it has since been reviewed and improved. > I'm re-posting it for discussion before eventually commiting it. > > The ternary operator always copies its second or third operand, which is very > slow compared to an if/else when the operand is an array for example:
Is that why the following does not work as I expected: $dbh = $how == 'r' ? (&$dbh_r) : (&$dbh_w); $dbh is NOT a reference to $dbh_r or $dbh_w. -- Alain Williams Linux/GNU Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer. +44 (0) 787 668 0256 http://www.phcomp.co.uk/ Parliament Hill Computers Ltd. Registration Information: http://www.phcomp.co.uk/contact.php #include <std_disclaimer.h> -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php