Get support for michaelcullum/intdiv_compat
If you're new to LTH, please see our FAQ for more information on what it is we do.
Support Options
Unfortunately, there are currently no active helpers for this repository on the platform. Until they become available, we reccomend the following actions:
View Open IssuesTake a look to see if anyone else has experienced the same issue as you and if they managed to solve it.
Open an IssueMake sure to read any relevant guidelines for opening issues on this repo before posting a new issue.
Sponsor directlyCheck out the page and see if there are any options to sponsor this project or it's developers directly.
michaelcullum/intdiv_compat
intdiv_compat
This library/polyfill provides the intdiv function that was added in PHP 7 in PHP 5.3 and later.
For more information see the RFC.
Requirements
Requires PHP 5.3.0 or later due to exceptions
Installation
Either require
the src/intdiv.php
file or install using Composer
composer require michaelc/intdiv-compat
Usage
int intdiv ( int $dividend , int $divisor )
Returns the integer quotient of the division of dividend by divisor
If divisor is 0, a DivisionByZeroError exception is thrown. If the dividend is ~PHP_INT_MAX (PHP_INT_MIN was introduced in PHP 7) and the divisor is -1, then an ArithmeticError exception is thrown.
See http://php.net/manual/en/function.intdiv.php for more information
Please note, if you define \Error in userland and it does not extend either \Throwable (Built-in PHP 7) or \Exception then an error will arise as the \Error class will be attempted to be redeclared.
If \Error exists and extends \Throwable or \Exception then we do not redeclare it. If \Error does not exist or exists but does not extend \Throwable or \Exception, we declare it and extend \Exception.
This library can be safely included on a system running PHP 7 and it will not affect core PHP 7 intdiv()
usage.
Tests
To run tests:
composer install
vendor/bin/phpunit
Our Mission
We want to make open source more sustainable. The entire platform was born from this and everything we do is in aid of this.
From the Blog
Interesting Articles
-
Generating income from open source
Jun 23 • 8 min read
-
2023 State of OSS
Apr 23 • 45 min read ★
-
A funding experiment...
Aug 19 • 10 min read
-
But You Said I could
Aug 19 • 2 min read
Thank you for checking out LiveTechHelper |
2025 © lth-dev incorporated
p-e622a1a2