Experimental project

This is a sandbox project, which contains experimental code for developer use only.

Check if something is a positive number. This module doesn't consider 0 to be a positive number and doesn't distinguish between -0 and 0. If you want to detect 0, use the positive_zero module.

The module allows other modules to alter its behaviour. Here's an example of how to modify it to include 0.

<?php
function MY_MODULE_is_positive_alter($value, &$result) {
  $result = $value >= 0;
}
?>

Project information

  • caution Minimally maintained
    Maintainers monitor issues, but fast responses are not guaranteed.
  • Module categories: Developer Tools
  • Created by travis-bradbury on , updated