Multiple bench on PHP Source code and result Result width : - xdebug.profiler - profiler graph by KCachegrind - result in relative time only –
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
299 B

<?php
function ArrayBySelf()
{
$a = array('Dogmeat', 'Ian', 'compagnon' => 'Katja', 'Tycho');
}
function arrayById()
{
$a['compagnon'] = 'Katja';
$a['0'] = 'Dogmeat';
$a['1'] = 'Ian';
$a['2'] = 'Tycho';
}
for ($i = 0; $i < 100000; $i++) {
ArrayBySelf();
arrayById();
}