This method is abstract, and in PHP 8.0+ its parameters are of type `mixed`, you can not change their types to types other than `mixed` when `extends`ing SplHeap.
The following example emits an error saying "Fatal error: Declaration of WuXianchengHeap::compare(string $one, string $two): int must be compatible with SplHeap::compare(mixed $value1, mixed $value2)".
<?php
class WuXianchengHeap extends SplHeap{
public function __construct(Iterator $iterator){
foreach($iterator as $item){
$this->insert($item);
}
}
public function compare(string $one, string $two):int{
return -1 * strNatCaseCmp($one, $two);
}
}
?>