How to solve the warning: Attempt to read property "name" on null in PHP

1 Answer

0 votes
$value1 = null;
echo $value1 ?? "null" . "\n";

$value2 = "PHP";
echo $value2 ?? "null" . "\n";



/*
run:

null
PHP

*/

 



answered Mar 21, 2024 by avibootz

Related questions

1 answer 98 views
98 views asked Oct 27, 2022 by avibootz
1 answer 114 views
114 views asked Dec 14, 2020 by avibootz
1 answer 109 views
1 answer 100 views
...