<?php
echo "Filling the array... ";
$t=time();
$a=array();
for($i=0;$i<10000;$i++) $a[uniqid()]=rand(0,100);
$t=time()-$t;
echo "$t sec\n";

function get_my_array()
	{
	global $a;
	return $a;
	}

echo "Using reset():";
$t=microtime(true);
echo reset(get_my_array());
$t=microtime(true)-$t;
echo " ($t sec)\n";

echo "Using array_values():";
$t=microtime(true);
echo array_values(get_my_array())[0];
$t=microtime(true)-$t;
echo " ($t sec)\n";
