<?php
function italico(&$array)
{
{
case 0: return null;
case 1: return $array[0];
default:
return implode (' ,',$array).' y '.$ult; }
}
function alexis($array) {
}
for ($i = 0; $i < 1000; $i++)
alexis($array);
$tiempoAlexis = $fin2 - $ini2;
for ($i = 0; $i < 1000; $i++)
italico($array);
$tiempoItalico = $fin1 - $ini1;
echo "Italico: " . $tiempoItalico."\n";
echo "Alexis: " . $tiempoAlexis;
PD9waHAKZnVuY3Rpb24gaXRhbGljbygmJGFycmF5KQp7CiAgICBzd2l0Y2ggKGNvdW50KCRhcnJheSkpCiAgICB7CiAgICBjYXNlIDA6IHJldHVybiBudWxsOwogICAgY2FzZSAxOiByZXR1cm4gJGFycmF5WzBdOwogICAgZGVmYXVsdDogICAgCiAgICAgICAgJHVsdCA9IGFycmF5X3BvcCgkYXJyYXkpOwogICAgICAgIHJldHVybiBpbXBsb2RlICgnICwnLCRhcnJheSkuJyB5ICcuJHVsdDsKICAgIH0gICAgCn0KIApmdW5jdGlvbiBhbGV4aXMoJGFycmF5KSB7Cgkkc3RyaW5nID0gaW1wbG9kZSgiLCAiLCAkYXJyYXkpOwoJcmV0dXJuIHN1YnN0cl9yZXBsYWNlICgkc3RyaW5nLCAiIHkgIiwgc3RycnBvcygkc3RyaW5nLCAiLCIpLCAyKTsKfQogCiRhcnJheSA9IHJhbmdlKDEsIDEwMDApOwogCiRpbmkyID0gbWljcm90aW1lKHRydWUpICogMTAwMDsKZm9yICgkaSA9IDA7ICRpIDwgMTAwMDsgJGkrKykKICAgIGFsZXhpcygkYXJyYXkpOwokZmluMiA9IG1pY3JvdGltZSh0cnVlKSAqIDEwMDA7CiR0aWVtcG9BbGV4aXMgPSAkZmluMiAtICRpbmkyOyAKIAokaW5pMSA9IG1pY3JvdGltZSh0cnVlKSAqIDEwMDA7CmZvciAoJGkgPSAwOyAkaSA8IDEwMDA7ICRpKyspCiAgICBpdGFsaWNvKCRhcnJheSk7CiRmaW4xID0gbWljcm90aW1lKHRydWUpICogMTAwMDsKJHRpZW1wb0l0YWxpY28gPSAkZmluMSAtICRpbmkxOwogCmVjaG8gIkl0YWxpY286ICIgLiAkdGllbXBvSXRhbGljby4iXG4iOwplY2hvICJBbGV4aXM6ICIgLiAkdGllbXBvQWxleGlzOw==