Php AMI Output headers

According to this note https://issues.asterisk.org/jira/browse/ASTERISK-27307 how can I get all Output headers in php if I use Asterisk 14 or 15? The below command only show last line in output key.

echo '<pre>'; var_dump($("sip show peers")); echo '</pre>';

array(4) {
["Response"]=>
string(7) "Success"
["ActionID"]=>
string(10) "A189400296"
["Message"]=>
string(22) "Command output follows"
["Output"]=>
string(79) "59 sip peers [Monitored: 2 online, 26 offline Unmonitored: 1 online, 0 offline]"
}

Did you test as describe using telnet to make sure you get all the outputs, If so you will need review your PHP code

I’ve got full output with telnet and command “Action: SIPpeers”. However I’m not using AMI in my php application, but AGI / phpagi-asmanager.php

If works over telnet you will need to work on the php code used for the AMI connection, also why do you need to use AMI over AGI to run a regular Asterisk command sip show peers, who can be run directly on the dialplan ?

I don’t want to rebuild whole project which is based on https://github.com/welltime/phpagi/blob/master/phpagi-asmanager.php
It seems that phpagi is not fully compatible with Asterisk >14…
Sangoma has a fork of this library and they made some changes.
Don’t know how to link this to my project as a replacement yet…

Those are third party library, you need to contact the developers