Add channel support to pecl module and state

For issue #13774