Absalom Posted November 27, 2010 Share Posted November 27, 2010 For debugging I've entered two echos to an if-else-if section in a method: if ( $options instanceof Zend_Config ) { $options = $options->toArray(); echo "1st condition true<br>"; } else if ( ! is_array($options) ) { echo "2nd condition true<br>"; exit(); throw new Bvb_Grid_Exception('options must be an instance from Zend_Config or an array'); } The crazy thing is the output I'm getting is: 1st condition true 2nd condition true Can you explain this?!?! Link to comment https://forums.phpfreaks.com/topic/219996-is-there-a-bug-in-php-or-i-think-i-go-bananas/ Share on other sites More sharing options...
JasonLewis Posted November 27, 2010 Share Posted November 27, 2010 I created a quick test and it's not doing that for me. What should it be outputting? Link to comment https://forums.phpfreaks.com/topic/219996-is-there-a-bug-in-php-or-i-think-i-go-bananas/#findComment-1140431 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.