- array_flip: documentation ( source)
<?php
$checkfor = 'test';
$words = array('test','derp','herp');
function noop(){}
for ($i = 1; $i++ < 100000;){
$flipped = array_flip($words);
if (isset($flipped[$checkfor])) {
noop();
}
}
/*
if (in_array($checkfor,$words)) {
echo "non-flip match";
}
*/