Skip to main content
added 29 characters in body
Source Link

You got to use this:

try { $result = intdiv(4, 0); } catch(DivisionByZeroError $e) { d($e->getMessage()); } 

PHP manual : http://php.net/manual/en/class.divisionbyzeroerror.php (Works with PHP 7 onwards)

Update: Using intdiv() - Integer division (Works with PHP 7 onwards)

You got to use this:

try { $result = intdiv(4, 0); } catch(DivisionByZeroError $e) { d($e->getMessage()); } 

PHP manual : http://php.net/manual/en/class.divisionbyzeroerror.php

Update: Using intdiv() - Integer division

You got to use this:

try { $result = intdiv(4, 0); } catch(DivisionByZeroError $e) { d($e->getMessage()); } 

PHP manual : http://php.net/manual/en/class.divisionbyzeroerror.php (Works with PHP 7 onwards)

Update: Using intdiv() - Integer division (Works with PHP 7 onwards)

added 1 character in body
Source Link

You got to use this:

try { $result = intdiv(4/, 0); } catch(DivisionByZeroError $e) { d($e->getMessage()); } 

PHP manual : http://php.net/manual/en/class.divisionbyzeroerror.php

Update: Using intdiv() - Integer division

You got to use this:

try { $result = intdiv(4/0); } catch(DivisionByZeroError $e) { d($e->getMessage()); } 

PHP manual : http://php.net/manual/en/class.divisionbyzeroerror.php

Update: Using intdiv() - Integer division

You got to use this:

try { $result = intdiv(4, 0); } catch(DivisionByZeroError $e) { d($e->getMessage()); } 

PHP manual : http://php.net/manual/en/class.divisionbyzeroerror.php

Update: Using intdiv() - Integer division

added 6 characters in body
Source Link

You got to use this:

try { $result = intdiv(4/0); } catch(DivisionByZeroError $e) { d($e->getMessage()); } 

PHP manual : http://php.net/manual/en/class.divisionbyzeroerror.php

Edit:Update: Using intdiv() - Integer division

You got to use this:

try { $result = intdiv(4/0); } catch(DivisionByZeroError $e) { d($e->getMessage()); } 

PHP manual : http://php.net/manual/en/class.divisionbyzeroerror.php

Edit: intdiv() - Integer division

You got to use this:

try { $result = intdiv(4/0); } catch(DivisionByZeroError $e) { d($e->getMessage()); } 

PHP manual : http://php.net/manual/en/class.divisionbyzeroerror.php

Update: Using intdiv() - Integer division

added 6 characters in body
Source Link
Loading
added 8 characters in body
Source Link
Loading
added 71 characters in body
Source Link
Loading
Source Link
Loading