# Bug Report <!-- First, thank you for reporting a bug. That takes time and we appreciate that! --> | Subject | Details | | :------------- | :------------------------------------------------- | | Rector version | Rector 2.6.6 (hash bff669) · from 2026-09-10 | the refactored code with array_any does not preserve all matching conditions ## Minimal PHP Code Causing Issue https://getrector.com/demo/47467d38-e31b-478a-ac1e-de0ee5bda472 ## Expected Behaviour expected code: ``` return array_any($noProxyArray, function ($area) use ($host) { if ($area === '*') { return true; } if (empty($area)) { return false; } if ($area === $host) { return true; } $area = '.' . ltrim($area, '.'); return str_ends_with($host, $area); }); ```
Bug Report
the refactored code with array_any does not preserve all matching conditions
Minimal PHP Code Causing Issue
https://getrector.com/demo/47467d38-e31b-478a-ac1e-de0ee5bda472
Expected Behaviour
expected code: