convert xml file to array php

PHP
$xmlfile = file_get_contents($path);
		$ob= simplexml_load_string($xmlfile);
		$json  = json_encode($ob);
		$configData = json_decode($json, true);

Source

Also in PHP: