3v4l.org

run code in 300+ PHP versions simultaneously
<?php class T { public $a = string_to_ascii("Perkele") public function string_to_ascii($string) { $ascii = NULL; for ($i = 0; $i < strlen($string); $i++) { $ascii += ord($string[$i]); } return($ascii); } } $t = new T(); var_dump($t->a);

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.0270.03020.27
7.0.10.0070.04320.41
7.0.00.0030.08720.09
5.6.170.0270.08020.54
5.6.160.0070.03720.45
5.6.150.0070.06318.15
5.6.140.0070.03318.29
5.6.130.0130.07718.16
5.6.120.0030.04320.98
5.6.110.0030.04321.00
5.6.100.0030.05321.13
5.6.90.0070.04020.98
5.6.80.0070.08020.37
5.5.310.0300.06720.26
5.5.300.0000.04318.08
5.5.290.0100.04718.05
5.5.280.0100.06320.88
5.5.270.0030.04020.97
5.5.260.0170.05020.86
5.5.250.0030.06320.49
5.5.240.0170.05320.25

preferences:
142.53 ms | 1398 KiB | 7 Q