desmart / support
Support package for DeSmart projects
Installs: 5 758
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 5
Forks: 0
Open Issues: 1
Requires
- ramsey/uuid: ^3.0@dev
Requires (Dev)
- phpspec/phpspec: ^2.2
- phpunit/phpunit: ^4.7
Suggests
- moontoast/math: Required for 32-bit processors
This package is not auto-updated.
Last update: 2024-12-13 11:25:26 UTC
README
Add desmart/support
to composer.json
:
{ "require": { "desmart/support": "1.0.*" } }
Helpers
bool()
Converts string to boolean values using filter_var()
with FILTER_VALIDATE_BOOLEAN
.
When filter_var()
is unable to convert it to boolean exception will be thrown.
Example usage:
<?php bool('1'); // true bool('yes'); // true bool('no'); // false ?>