>>> x = 5
>>> 1 < x < 10
True
>>> 10 < x < 20
False
>>> x < 10 < x*10 < 100
True
>>> 10 > x <= 9
True
>>> 5 == x > 4
True
В случае, если Вы думаете, что это делает 1 < x
, который выходит как True
, и затем сравнение True < 10
, который является также True
, тогда не, это действительно не, что происходит (см. последний пример.) Это действительно переводит в 1 < x and x < 10
, и x < 10 and 10 < x * 10 and x*10 < 100
, но с меньшим количеством ввода и каждым термином только оценен однажды.
One way to get null when "calling" upload would be if you had this (trying to access an inexisting property) :
if($a = $this->upload) { // => NULL
$this->update_db(); //never reached this line
}
var_dump($a);
instead of this (from OP) (trying to call an existing method):
if($a = $this->upload()) { // => true or false
$this->update_db(); //never reached this line
}
var_dump($a);
Did you check you didn't forget the ()
?
If it's not this, try with error_reporting set to E_ALL
, and displaying the errors :
ini_set('display_errors', true);
error_reporting(E_ALL);
(you said "ERROR_ALL is on", so not sure it's what you meant)
Убедитесь, что оператор возврата в конце метода загрузки является единственным оператором возврата в этом методе.