?php
require './vendor/autoload.php';

$ApiURL="https://slack.com/api/users.list?token=".$SlackToken;
$ApiURL="userlist.xml";
$UserProfileList = file_get_contents($ApiURL);
$hoge = json_decode($UserProfileList);
foreach($hoge->{'members'} as $line){

if(isset($line->{'profile'}->{'email'}))var_dump($line->{'profile'});

}