private function notifyPolls(array $selected, array & $watchers): void
    {
        foreach ($selected as $k => $stream) {
            $k = $k ?: (int) $stream;
            
            if (isset($watchers[$k])) {
                foreach ($watchers[$k] as $watcher) {
                    if (isset($watchers[$k][$watcher->id])) {
                        ($watcher->callback)($watcher->id, $stream);
                    }
                }
            }
        }
    }
private function notifyPolls(array $selected, array & $watchers): void
    {
        foreach ($selected as $k => $stream) {
            $k = $k ?: (int) $stream;
            
            if (isset($watchers[$k])) {
                foreach ($watchers[$k] as $watcher) {
                    if (isset($watchers[$k][$watcher->id])) {
                        ($watcher->callback)($watcher->id, $stream);
                    }
                }
            }
        }
    }
private function notifyPolls ( array $ selected , array & $ watchers ) : void { foreach ( $ selected as $ k => $ stream ) { $ k = $ k ? : ( int ) $ stream ; if ( isset ( $ watchers [ $ k ] ) ) { foreach ( $ watchers [ $ k ] as $ watcher ) { if ( isset ( $ watchers [ $ k ] [ $ watcher -> id ] ) ) { ( $ watcher -> callback ) ( $ watcher -> id , $ stream ) ; } } } } }
Trigger all stream watchers for the selected resources.

@param array $selected Streams being reported as readable / writable.
@param array $watchers Watchers that might be triggered.
Trigger all stream watchers for the selected resources .