#21035 [Opn->Bgs]: ternary operator can't concanenate with other strings

From: Date: Mon, 16 Dec 2002 02:30:30 +0000
Subject: #21035 [Opn->Bgs]: ternary operator can't concanenate with other strings
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-27808@lists.php.net to get a copy of this message
ID: 21035 Updated by: sniper@php.net Reported By: eric@themepark.com -Status: Open +Status: Bogus Bug Type: Unknown/Other Function Operating System: Windows XP PHP Version: 4.2.1 New Comment: Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php RTFM: http://www.php.net/manual/sl/language.operators.php#language.operators.precedence Hint: Use ()'s.. Previous Comments: ------------------------------------------------------------------------ [2002-12-15 19:40:31] eric@themepark.com $a = 'eric is a '.(1) ? 'goofball' : 'kitty-cat'; echo $a; This snippet returns "goofball" instead of "eric is a goofball". Eric Mueller, eric@themepark.com ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=21035&edit=1

« previous php.bugs (#27808) next »