This commit is contained in:
Jim Shepich III 2023-05-30 18:12:01 -04:00
parent 6d6a01ede5
commit 222bfa1680
2 changed files with 8 additions and 1 deletions

5
info.php Normal file
View File

@ -0,0 +1,5 @@
<?php
phpinfo();
?>

View File

@ -3,7 +3,9 @@
function page_comparator($a,$b){ function page_comparator($a,$b){
//This function is the sorting criterion for the later call of usort, which will sort the page objects //This function is the sorting criterion for the later call of usort, which will sort the page objects
//from pages.json in increasing order of their "index" value. //from pages.json in increasing order of their "index" value.
return $a->index > $b->index; return $a->index <=> $b->index;
//For some reason, PHP8 requires the spaceship operator (<=>)
//instead of a greater than symbol.
} }
function gen_nav_element($page){ function gen_nav_element($page){