3v4l.org

run code in 300+ PHP versions simultaneously
<?php $time1 = microtime(true); for ($i = 0; $i < 500000; $i ++) { $a = 1/3 * 1/3; } $time2 = microtime(true); for ($i = 0; $i < 500000; $i ++) { $a = bcmul(bcdiv(1, 3, 42), bcdiv(1, 3, 42), 42); } $time3 = microtime(true); echo "floating point: " . ($time2 - $time1) . "us" . PHP_EOL . "bcmath: " . ($time3 - $time2) . "us";

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
7.3.10.0762.26714.45
7.3.00.0352.36514.57
7.2.130.0372.19614.92
7.2.120.0532.18514.91
7.2.110.0532.20914.72
7.2.100.0302.23514.87
7.2.90.0402.21714.77
7.2.80.0372.13015.06
7.2.70.0302.15414.70
7.2.60.0472.30614.89
7.2.50.0472.43214.75
7.2.40.0272.45114.73
7.2.30.0302.25314.98
7.2.20.0232.34614.88
7.2.10.0502.42114.90
7.2.00.0432.36315.18
7.1.250.0632.36413.89

preferences:
33 ms | 400 KiB | 5 Q