<?php
error_reporting(E_ALL);
function quicksort($seq)
{
if(!count($seq)) {return $seq;}
$pivot= $seq[0];
$low = $high = array();
$length = count($seq);
for($i=1; $i < $length; $i++)
{
if($seq[$i] <= $pivot)
{
$low []= $seq[$i];
} else {
$high []= $seq[$i];
}
}
return array_merge(quicksort($low), array($pivot), quicksort($high));
$numbers = array(2,5,6,8,3,6,4,45,23,456,23,6,90,5,2,156,2,1,3,12,48,561,1,168);
$words = array('gr','sdfg','ik','shrt','jy','bcnv',' 0','0','01','_a','ass');
print_r(quicksort($numbers));
print_r(quicksort($words));
highlight_file(quicksort.php);
?>
屏幕是空白的。PHP 错误日志显示文件意外结束。我累了,可能会忽略一个分号,但我找不到它。