I was trying to extend SplPriorityQueue like this:
<?php
class AdjustablePriorityQueue extends SplPriorityQueue {
protected $direction='desc';function __construct($direction='desc'){
parent::__construct(); $this->direction=($direction=='asc') ? 'asc': 'desc';
}
function compare($priority1,$priority2){
if($this->direction=='asc') return parent::compare($priority2, $priority1);
return parent::compare($priority1,$priority2);
}
}
?>
calling `parent::__construct()` gives a fatal error " Cannot call constructor". If I leave out that call, everything works fine. This suggests that SplPriorityQueue does not actually have a `__construct()` method.