2011/11/24  <de...@lucato.it>:
> On 24 November 2011 01:38, Stas Malyshev <smalys...@sugarcrm.com> wrote:
> Hi,
>
> I hadn't the opportunity to install php 5.4 to test this, so I was
> wondering if someone could test how would this code behave ?
>
> ###########
> if (
> !isset( $widget_options['dashboard_incoming_links'] )
>  || !isset( $widget_options['dashboard_incoming_links']['home'] )
>  || $widget_options['dashboard_incoming_links']['home'] != get_option('home') 
> )
> ###########
>
> Is that correct saying that if the first condition is false the second
> will always be true ?
>
> Note: that's a piece of Wordpress

[yohgaki@dev php-src-5.4]$ ./php -r 'var_dump(!isset($a["a"]["a"]));'
bool(true)
[yohgaki@dev php-src-5.4]$ ./php -r '$a =
["a"=>["a"=>1]];var_dump(!isset($a["a"]), $a);'
bool(false)
array(1) {
  ["a"]=>
  array(1) {
    ["a"]=>
    int(1)
  }
}
[yohgaki@dev php-src-5.4]$ ./php -r '$a =
["a"=>["a"=>1]];var_dump(!isset($a["a"]["a"]), $a);'
bool(false)
array(1) {
  ["a"]=>
  array(1) {
    ["a"]=>
    int(1)
  }
}

So it's not always true.

--
Yasuo Ohgaki
yohg...@ohgaki.net

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to