vanilla-php / benchmark-php

:rocket: A benchmark script for PHP and MySQL (Archived)
MIT License
192 stars 90 forks source link

Update benchmark.php #14

Closed solarisfire closed 3 years ago

solarisfire commented 3 years ago

Stripped out the pi maths function. It doesn't really do any maths, just returns a constant float M_PI which doesn't really benchmark PHP mathematical performance.

(See: /ext/standard/php_math.h:#define M_PI 3.14159265358979323846 / pi /)

Also as of PHP 8.0 it will throw a PHP Fatal error if you pass an argument to the pi function:

PHP Fatal error: Uncaught ArgumentCountError: pi() expects exactly 0 arguments, 1 given in /var/www/html/benchmark.php:182