3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Benchmark using GLOBAL variables $startTime = microtime(true); for ($i = 0; $i < 10000; $i++) { global $myVar; $myVar = $i; } $endTime = microtime(true); $globalTime = $endTime - $startTime; // Benchmark using a function $startTime = microtime(true); function setVar($value) { return $value; } for ($i = 0; $i < 10000; $i++) { $myVar = setVar($i); } $endTime = microtime(true); $functionTime = $endTime - $startTime; echo "GLOBAL: $globalTime seconds\n"; echo "FUNCTION: $functionTime seconds\n";

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)
8.2.100.0280.00418.11
8.2.90.0270.00518.11
8.2.80.0260.00518.11
8.2.70.0210.00918.11
8.2.60.0240.00618.11
8.2.50.0270.00318.11
8.2.40.0180.00518.46
8.2.30.0200.00818.11
8.2.20.0240.00418.11
8.2.10.0200.00818.11
8.2.00.0220.00518.11
8.1.230.0160.00319.01
8.1.220.0230.00518.11
8.1.210.0220.00718.11
8.1.200.0230.00618.11
8.1.190.0230.00418.11
8.1.180.0210.00618.11
8.1.170.0220.00418.11
8.1.160.0230.00518.11
8.1.150.0210.00818.11
8.1.140.0210.00718.11
8.1.130.0240.00318.11
8.1.120.0260.00218.11
8.1.110.0250.00518.11
8.1.100.0260.00518.11
8.1.90.0200.00818.11
8.1.80.0220.00518.11
8.1.70.0230.00518.11
8.1.60.0210.00618.11
8.1.50.0190.00718.11
8.1.40.0230.00618.11
8.1.30.0230.00418.11
8.1.20.0230.00418.11
8.1.10.0170.01018.11
8.1.00.0240.00518.11
8.0.300.0230.00718.11
8.0.290.0200.01018.11
8.0.280.0250.00318.11
8.0.270.0230.00518.11
8.0.260.0260.00218.11
8.0.250.0230.00618.11
8.0.240.0220.00618.11
8.0.230.0180.01018.11
8.0.220.0210.00718.11
8.0.210.0220.00618.11
8.0.200.0230.00418.11
8.0.190.0210.00818.11
8.0.180.0230.00618.11
8.0.170.0200.00718.11
8.0.160.0230.00418.11
8.0.150.0220.00618.11
8.0.140.0230.00618.11
8.0.130.0260.00218.11
8.0.120.0190.00918.11
8.0.110.0220.00618.11
8.0.100.0270.00318.11
8.0.90.0260.00518.11
8.0.80.0250.00518.11
8.0.70.0240.00518.11
8.0.60.0190.00718.11
8.0.50.0210.00718.11
8.0.30.0190.00918.11
8.0.20.0270.00218.11
8.0.10.0250.00218.11

preferences:
33.14 ms | 403 KiB | 5 Q