3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xreserveddbstrings=1000; function mkfile($path){ fclose(fopen($path, 'a')); } function putdata($data, $size=256){ $i=1; while(true){ if($i<16) $pre=0; if(!file_exists('./db/'.$pre.dechex($i).'.list')) mkfile('./db/'.$pre.dechex($i).'.list'); if($i>hexdec('ff')){ return false; $GLOBALS[xreservederror].='<t>[u01] Database is full.</t>'; break; } if(filesize('./db/'.$pre.dechex($i).'.list')<($GLOBALS[xreserveddbstrings]*($size+1))){ $data.=str_repeat(' ', $size); $data=substr($data, $size); file_put_contents('./db/'.$pre.dechex($i).'.list', $data."\n", LOCK_EX|FILE_APPEND); break; } $i++; unset($pre); } function getdata($index, $size=256){ $listindex=ceil($index/$GLOBALS[xreservedmaxstrings]); $liststring=($index-($listindex-1)*$GLOBALS[xreservedmaxstrings]); $pre=''; if($listindex<16) $pre=0; if(!file_exists('./db/'.$pre.dechex($listindex).'.list')){ $GLOBALS[xreservederror].='<t>[u02] Requested list is not exists.</t>'; return false; }elseif(filesize('./db/'.$pre.dechex($listindex).'.list')<($liststring*($size+1))){ $GLOBALS[xreservederror].='<t>[u03] Requested string is not exists.</t>'; return false; }else{ $listf=fopen('./db/'.$pre.dechex($listindex).'.list', 'r'); fseek($listf, ($liststring*($size+1))); $string=fgets($listf, $size); return rtrim($string, ' '); } }

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)
5.6.140.0100.05718.15
5.6.130.0130.07718.20
5.6.120.0070.07320.92
5.6.110.0100.06021.02
5.6.100.0000.09321.17
5.6.90.0030.05021.13
5.6.80.0070.04720.50
5.6.70.3930.04320.38
5.5.300.0100.05018.07
5.5.290.0130.05717.98
5.5.280.0030.08320.99
5.5.270.0100.04020.91
5.5.260.0070.05020.95
5.5.250.0130.06020.55
5.5.240.0100.08020.21
5.4.450.0770.07119.24
5.4.440.0640.06319.43
5.4.430.0580.05219.57
5.4.420.0520.06219.46
5.4.410.0500.05819.22
5.4.400.0520.06118.93
5.4.390.0660.07119.22
5.4.380.0710.06118.97
5.4.370.0640.05919.07
5.4.360.0610.05819.27
5.4.350.0630.05819.15
5.4.340.0630.06019.26
5.4.320.0670.05819.17
5.4.310.0610.05818.96
5.4.300.0680.05619.20
5.4.290.0710.06719.11
5.4.280.0790.06019.14
5.4.270.0700.05719.13
5.4.260.0740.05419.24
5.4.250.0800.05719.22
5.4.240.0730.05919.27
5.4.230.0720.06419.18
5.4.220.0770.05719.07
5.4.210.0730.05919.00
5.4.200.0730.05019.00
5.4.190.0740.06319.04
5.4.180.0640.06219.01
5.4.170.0760.05618.93
5.4.160.0790.06619.27
5.4.150.0710.06119.02
5.4.140.0700.05916.43
5.4.130.0700.05916.47
5.4.120.0730.05616.46
5.4.110.0690.05716.57
5.4.100.0590.05716.52
5.4.90.0560.05416.50
5.4.80.0670.04716.65
5.4.70.0030.07016.61
5.4.60.0200.04316.55
5.4.50.0030.07016.44
5.4.40.0270.06716.54
5.4.30.0170.03716.24
5.4.20.0300.06016.27

preferences:
147.84 ms | 1394 KiB | 7 Q