search
  • Sign In
  • Sign Up
Password reset successful

Follow the proiects vou are interested in andi aet the latestnews about them taster

New functions in PHP7

Collection 105
Read 69606
update time 2016-09-11
  • The GMP module has added the gmp_random_seed() function.
  • PCRE adds the preg_replace_callback_array method. RFC: https://wiki.php.net/rfc/preg_replace_callback_array
  • Added intdiv() function.
  • Added error_clear_last() function to reset error status.
  • Added ZipArchive::setComapressionIndex() and ZipArchive::setCompressionName() to set the compression method.
  • Added deflate_init(), deflate_add(), inflate_init(), inflate_add().


PHP intdiv() function

PHP 7 has added the intdiv() function , receives two parameters, and returns the value of the first parameter divided by the second parameter and rounded.

Example

<?php
echo intdiv(9,3),PHP_EOL;
echo intdiv(10,3),PHP_EOL;
echo intdiv(5,10),PHP_EOL;
?>

The execution output of the above program is:

3
3
0
Hot AI Tools
Undress AI Tool
Undress AI Tool

Undress images for free

AI Clothes Remover
AI Clothes Remover

Online AI tool for removing clothes from photos.

Undresser.AI Undress
Undresser.AI Undress

AI-powered app for creating realistic nude photos

ArtGPT
ArtGPT

AI image generator for creative art from text prompts.

Stock Market GPT
Stock Market GPT

AI powered investment research for smarter decisions

Popular tool
Notepad++7.3.1
Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version
SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1
Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6
Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version
SublimeText3 Mac version

God-level code editing software (SublimeText3)