Link to home
Start Free TrialLog in
Avatar of bhession
bhession

asked on

What does this PHP sentence mean/do?

Dont know very much about PHP this shoule be a straightforward one for anyone familiar with it. Below I am trying to figure out what this line does so I can replicate it in Java.

if (!$power) $power=0;

I think it is saying, If power is null then power is 0.

Can anyone confirm?
SOLUTION
Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
If $power is empty, NULL, FALSE or Zero, it will assign the integer value Zero.
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of bhession
bhession

ASKER

Much gratitude, very helpful. Thanks guys