- reset: documentation ( source)
- array_filter: documentation ( source)
- stripos: documentation ( source)
- current: documentation ( source)
<?php
echo 'CURRENT: '.current(
array_filter([3=>'three',7=>'seven'],
function($e){
return stripos($e,'ee');
}
)
).PHP_EOL;
echo 'RESET: '.reset(
array_filter([3=>'three',7=>'seven'],
function($e){
return stripos($e,'ee');
}
)
);