3v4l.org

run code in 300+ PHP versions simultaneously
<?php function GetTheAnswer() { return 1; } function GetOtherAnswer() { if(GetTheAnswer() = 2) { return 4; } else { return 5; } } global $theAnswer = GetTheAnswer(); $otherAnswer = GetOtherAnswer(); $averageAnswer = ($theAnswer + $otherAnswer) / 2; echo $averageAnswer;

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.0.20.0400.07020.06
7.0.10.0130.06320.10
7.0.00.0030.09320.16
5.6.170.0270.07320.39
5.6.160.0070.08720.50
5.6.150.0000.09018.29
5.6.140.0170.07718.14
5.6.130.0030.04318.23
5.6.120.0070.08321.01
5.6.110.0070.05321.02
5.6.100.0070.08720.98
5.6.90.0100.07721.09
5.6.80.0130.07320.44
5.5.310.0130.04320.36
5.5.300.0100.08018.08
5.5.290.0130.05017.98
5.5.280.0100.06320.80
5.5.270.0070.05020.87
5.5.260.0100.06320.87
5.5.250.0100.08020.78
5.5.240.0330.07020.26

preferences:
140.08 ms | 1394 KiB | 7 Q