/* For variables of type boolean we need to access an object property which stores the boolean value. This is needed as shm_get_var() could return FALSE when returning a boolean variable set to FALSE or when a non-existing variable key was tried to access! */

To follow up on the posts by anonymous, Bob Van Zant and chris at free-source dot com below (or, as must people inexplicably write, above) regarding the PHP warning and FALSE that shm_get_var returns if the variable key doesn't exist:

My tests (with PHP4.3.4) show that defined() is useless here. Because the function defined(string) checks whether the constant whose name is string exists, the code <?phpif ( defined(@shm_get_var($mutex, $mutex_key)) { ...}?>acts the same ("..." does not get executed) whether the variable is defined or not--unless $mutex_key happens to identify a valid string that happens to be the name of a constant. :)