summaryrefslogtreecommitdiff
path: root/Zend/tests/nullsafe_operator/030.phpt
blob: 7bff0b2524ca2008d58951c75554c08f98c2c95e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
--TEST--
Empty on nullsafe method
--FILE--
<?php

class Test {
    public function method($value) {
        return $value;
    }
}

$null = null;
var_dump(empty($null?->method()));
$test = new Test;
var_dump(empty($test?->method(false)));
var_dump(empty($test?->method(42)));

?>
--EXPECT--
bool(true)
bool(true)
bool(false)