Jump to content

Is there a bug in PHP (or: I think I go bananas)


Absalom

Recommended Posts

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?!?!

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.