Home >Backend Development >PHP Tutorial >php anonymous function example 1 (use)
<span><span></span></span>
<?php $data = array('first' => 1, 'second' => 2, 'third' => 3); $data = array_filter($data, function ($item) use (&$data) { echo "Filtering key ", key($data), '<br>', PHP_EOL; next($data); return false; }); ?>
Copyright Statement: This article is an original article by the blogger and may not be reproduced without the blogger's permission.
The above introduces the PHP anonymous function example 1 (use), including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.