Location: PHPKode > scripts > Class: Sort > example.php
<?php
require("class.sort.php");
ini_set("max_execution_time", 3600);
set_time_limit(3600);
	$sort = new sort();
	$i = 0;
	$h = array();
	while($i < 5000) {
		$h[$i] = mt_rand(0,100000);
		++$i;
	}
	$res = $sort->heap_sort($h);
	echo "<pre>";
	print_r($res);
Return current item: Class: Sort