<?php

$output =  <<<OUTPUT
CLASS: Win32_Process
CreationDate|ExecutablePath|Handle|Name|Priority|ProcessId|WorkingSetSize \r
20160824162429.944953-180|(null)|4|System|8|4|2285568 \r
20160824162429.954968-180|(null)|416|smss.exe|11|416|716800 \r
20160824162431.296897-180|C:\Windows\system32\csrss.exe|484|csrss.exe|13|484|5029888 \r
20160824162431.717502-180|C:\Windows\system32\csrss.exe|528|csrss.exe|13|528|6160384 \r
20160824162431.847689-180|C:\Windows\system32\wininit.exe|536|wininit.exe|13|536|4005888 \r
20160824162431.877732-180|C:\Windows\system32\winlogon.exe|564|winlogon.exe|13|564|4403200 \r
20160824162432.168150-180|C:\Windows\system32\services.exe|616|services.exe|9|616|6356992 \r
20160824162432.328380-180|C:\Windows\system32\lsass.exe|628|lsass.exe|9|628|8413184 \r
20160824162432.338395-180|C:\Windows\system32\lsm.exe|636|lsm.exe|8|636|3878912 \r
20160824162433.119518-180|C:\Windows\system32\svchost.exe|800|svchost.exe|8|800|5939200 \r
20160824162433.219662-180|C:\Windows\system32\VBoxService.exe|848|VBoxService.exe|8|848|5877760 \r
20160824162433.483040-180|C:\Windows\system32\svchost.exe|900|svchost.exe|8|900|6172672 \r
20160824162433.582182-180|C:\Windows\System32\svchost.exe|936|svchost.exe|8|936|7872512 \r
20160824162434.033830-180|C:\Windows\system32\svchost.exe|1020|svchost.exe|8|1020|5718016 \r
20160824162434.199067-180|C:\Windows\system32\svchost.exe|1060|svchost.exe|8|1060|31662080 \r
20160824162434.254146-180|C:\Windows\system32\SLsvc.exe|1092|SLsvc.exe|8|1092|13414400 \r
20160824162434.386336-180|C:\Windows\system32\svchost.exe|1116|svchost.exe|8|1116|11026432 \r
20160824162434.496494-180|C:\Windows\System32\svchost.exe|1196|svchost.exe|8|1196|8716288 \r
20160824162434.551573-180|C:\Windows\system32\svchost.exe|1220|svchost.exe|8|1220|14458880 \r
20160824162434.837984-180|C:\Windows\system32\svchost.exe|1348|svchost.exe|8|1348|9605120 \r
20160824162441.788953-180|C:\Windows\System32\spoolsv.exe|1484|spoolsv.exe|8|1484|8818688 \r
20160824162441.943175-180|C:\Windows\system32\svchost.exe|1548|svchost.exe|8|1548|5152768 \r
20160824162441.998254-180|C:\Windows\system32\svchost.exe|1580|svchost.exe|8|1580|2920448 \r
20160824162442.064348-180|C:\Windows\System32\svchost.exe|1616|svchost.exe|8|1616|2306048 \r
20160824162445.706577-180|C:\Windows\system32\taskeng.exe|1992|taskeng.exe|6|1992|5599232 \r
20160824162450.843965-180|C:\Windows\system32\taskeng.exe|428|taskeng.exe|8|428|7766016 \r
20160824162456.632288-180|C:\Windows\system32\Dwm.exe|1832|dwm.exe|8|1832|3710976 \r
20160824162456.932720-180|C:\Windows\Explorer.EXE|688|explorer.exe|8|688|21454848 \r
20160824162457.713843-180|C:\Windows\System32\VBoxTray.exe|1032|VBoxTray.exe|8|1032|5095424 \r
20160824162501.909877-180|C:\Windows\system32\conime.exe|1588|conime.exe|8|1588|3432448 \r
20160824162646.109709-180|C:\Windows\System32\msdtc.exe|1836|msdtc.exe|8|1836|6926336 \r
20160824162732.316150-180|C:\Windows\system32\wbem\wmiprvse.exe|2008|WmiPrvSE.exe|8|2008|13152256 \r
20160824162747.558067-180|C:\Windows\system32\wuauclt.exe|1232|wuauclt.exe|8|1232|4935680 \r
20160825115345.986686-180|C:\Users\Administrador\Desktop\wmiexplorer.exe|2080|wmiexplorer.exe|8|2080|8876032 \r
20160826130558.767043-180|C:\Windows\system32\SLUI.exe|2928|SLUI.exe|8|2928|6709248 \r
20160826130639.427821-180|C:\Windows\system32\taskeng.exe|3432|taskeng.exe|6|3432|4108288 \r
OUTPUT;

$output = str_replace("CLASS: Win32_Process","", $output);
$output = (explode("\r\n", $output));

$keys = explode("|", $output[0]);


for($i = 1; $i <= count($output)-1; $i++){
	$values[$i] = explode("|", $output[$i]);
	$final[] = array_combine($keys, $values[$i]);
}	


print_r($final);

