i.e. -
Code: Select all
if ($type & SIMPLEPIE_TYPE_RSS_SYNDICATION)Code: Select all
if ($type && SIMPLEPIE_TYPE_RSS_SYNDICATION)Moderator: General Moderators
Code: Select all
if ($type & SIMPLEPIE_TYPE_RSS_SYNDICATION)Code: Select all
if ($type && SIMPLEPIE_TYPE_RSS_SYNDICATION)Code: Select all
0 & 0 = 0 false && false = false
0 & 1 = 0 false && true = false
1 & 0 = 0 true && false = false
1 & 1 = 1 true && true = trueCode: Select all
0 == false, everything else == true
1 & 1 = 1
1 & 2 = 0 2 & 2 = 2
1 & 3 = 1 2 & 3 = 2 3 & 3 = 3
1 & 4 = 0 2 & 4 = 0 3 & 4 = 0 4 & 4 = 4
1 & 5 = 1 2 & 5 = 0 3 & 5 = 1 4 & 5 = 4 5 & 5 = 5
1 & 6 = 0 2 & 6 = 2 3 & 6 = 2 4 & 6 = 4 5 & 6 = 4
1 & 7 = 1 2 & 7 = 2 3 & 7 = 3 4 & 7 = 4 5 & 7 = 5
1 & 8 = 0 2 & 8 = 0 3 & 8 = 0 4 & 8 = 0 5 & 8 = 0Code: Select all
$categories_parent[] =& new $this->feed->category_class($term, $scheme, $label);Code: Select all
func(&$variable);I'll make sure to read everything from that link, but expect more questions.tasairis wrote:There's no "call-by-reference assignment" - you're mixing up a few terms. Read up.
The deprecated feature is call-time pass-by-reference. That's when you pass variables by-reference to a function when you call the function.The code you have is perfectly fine: category_class returns a reference to a variable, but to keep that reference you need to use =& when you assign the result to a variable. In PHP 5 this is only necessary when dealing with things that aren't objects or resources, in PHP 4 you need it for objects too.Code: Select all
func(&$variable);
I agree, but it's easier said than done when it involves superiors.tasairis wrote:I strongly suggest you use the same version of PHP on your development machine as on the server.