As Rizier123 said above, the conditional is checking for "Truthy" values in the variable $a.
In a loosely-typed language like PHP, a truthy value is anything that is a non-empty, non-NULL, or non-zero value.
See this great answer to a similar question:
https://stackoverflow.com/a/6693908/2796449
or the PHP docs:
http://php.net/manual/en/language.types.boolean.php
Boolean logic always reduces down the entire statement down to one value, either TRUE or FALSE. So executing something like "echo (3==4);" will show FALSE. Similarly if your variable returns a truthy value, it will be evaluated as TRUE.
These 3 are all comparable statements:
$a = 1;
if ( $a )
if ( 1 )
if ( TRUE )