Php AMI Output headers

According to this note 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) {
string(7) "Success"
string(10) "A189400296"
string(22) "Command output follows"
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
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