3v4l.org

run code in 300+ PHP versions simultaneously
<?php class T { public $a = $this->string_to_ascii("Perkele") 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.0100.04720.07
7.0.10.0070.05720.23
7.0.00.0130.08320.11
5.6.170.0170.04720.45
5.6.160.0030.04320.54
5.6.150.0000.04718.15
5.6.140.0070.03718.18
5.6.130.0130.06018.18
5.6.120.0030.04021.04
5.6.110.0070.03720.88
5.6.100.0100.05320.98
5.6.90.0000.04720.97
5.6.80.0100.04320.46
5.5.310.0300.07320.50
5.5.300.0030.05317.95
5.5.290.0070.07717.99
5.5.280.0070.07720.84
5.5.270.0000.04320.76
5.5.260.0070.07720.86
5.5.250.0070.06020.68
5.5.240.0130.07020.25

preferences:
137.62 ms | 1398 KiB | 7 Q