<?php
error_reporting(-1);

$dice = 7;

$storage = array_fill($dice,$dice*6-$dice+1,0);

for ($i=1;$i<1000000;$i++) { 
	$sum=0;
	for ($j=1;$j<=$dice;$j++) {
		$num=mt_rand(1,6);
		$sum+=$num;
	}	
	$storage[$sum]++;
}	

foreach ($storage as $index => $number) {
	
	echo str_pad($index,2,"0",STR_PAD_LEFT);
	echo "|";
	echo str_repeat("|", $number/1000);
	
	echo"$number\n";
}
