PHP Doc (http://php.net/manual/en/language.operators.bitwise.php) clearly states:
~ $a    Not  Bits that are set in $a are not set, and vice versa.
So why am I getting a fatal error when trying to run the following line?
~ $noResults;
TIA
You are getting this error because $noResults is not an integer (or string, but that's just because of implicit typecasting).
~ will work on numbers and strings, couldn't get it working on objects and arrays.
AND the variable to negate MUST be set.
 echo ~ $a;  // won't work
whereas
$a = '';
echo ~ $a;  // will work
and
$a; echo ~$a; // will work too.
I have no problems with it :
$a = 5;
$a = ~ $a;
echo $a; // -6
Are you sure $noResults is an integer ?
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论