1
0
mirror of https://github.com/php/php-src.git synced 2026-03-25 16:52:18 +01:00
Files
archived-php-src/Zend/tests/nullsafe_operator/030.phpt
2020-08-03 10:16:38 +02:00

23 lines
325 B
PHP

--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)