Skip to content

Instantly share code, notes, and snippets.

MarkBaker /
Last active Apr 17, 2018
PHPExcel formula debugging (prior to 1.7.9)

PHPExcel formula debugging

Prior to version 1.7.9

/** Error reporting */
ini_set('display_errors', TRUE);
ini_set('display_startup_errors', TRUE);
MarkBaker /
Last active Mar 31, 2016
Iterating over an SPLHeap appears to remove entries from the heap

Trying a little experiment with PHP's SPLHeap, but puzzled by the fact that iterating over the heap seems to be removing each entry as I access it.

The code

class ExtendedSPLHeap extends \SPLHeap {

    protected function compare($a, $b) {
        if ($a->latitude == $b->latitude) {
            return 0;