<?php class A { public static $insert = []; } $data = ['a', 'b', 'c']; array_filter($data, function (string $d) { if ($d === 'a') { return true; } A::$insert[] = $d; return false; }); var_dump(A::$insert);
You have javascript disabled. You will not be able to edit any code.