Get pppoe in interface

Hi masters.
I have a microtic router. This includes pppoe-server. My clients connect to the internete here. I can view the details of a customer in the interface section as follows.

As I pointed out in the picture, it is possible to read where the customer is connected via the interface.

But… :put [/ interface get 30] does not have interface information on output when I run command. The output is as follows.

.id=*f00adc;actual-mtu=1480;disabled=false;dynamic=true;fast-path=true;fp-rx-byte=243361091;fp-rx-packet=1866233;fp-tx-byte=0;fp-tx-packet=0;last-link-up-time=sep/14/2017 05:16:38;link-downs=0;mtu=1480;name=;running=true;rx-byte=243361091;rx-drop=0;rx-error=0;rx-packet=1866233;tx-byte=3654480301;tx-drop=0;tx-error=0;tx-packet=2755483;type=pppoe-in

There is no interface information here. How can I get the knowledge of the interface.

You can use PPPoE server monitor command to see this value in CLI:
/interface pppoe-server monitor once do={:put $“interface”}

And store it in the global variable
/interface pppoe-server monitor once do={:global i $“interface”}

is it possible to run this code with the php API and get the output?

Sure:

<?php
use PEAR2\Net\RouterOS;

require_once 'PEAR2_Net_RouterOS-1.0.0b6.phar';

$client = new RouterOS\Client('192.168.88.1', 'admin', 'password');

$request = new RouterOS\Request('/interface pppoe-server monitor');
$request->setArgument('numbers', '<pppoe-user>')->setArgument('once');

////Or if you are not accepting user input, you can also just use
//$request = new RouterOS\Request('/interface pppoe-server monitor numbers="<pppoe-user>" once');

$response = $client->sendSync($request);
echo $response->getProperty('interface'); 

Thank you masters…