Skip to content

Instantly share code, notes, and snippets.

Avatar

Mark Baker MarkBaker

View GitHub Profile
@MarkBaker
MarkBaker / PHPExcel_Formula_Debugging.md
Last active Apr 17, 2018
PHPExcel formula debugging (prior to 1.7.9)
View PHPExcel_Formula_Debugging.md

PHPExcel formula debugging

Prior to version 1.7.9

/** Error reporting */
error_reporting(E_ALL);
ini_set('display_errors', TRUE);
ini_set('display_startup_errors', TRUE);
date_default_timezone_set('Europe/London');
@MarkBaker
MarkBaker / SPLHeap_Issue.md
Last active Mar 31, 2016
Iterating over an SPLHeap appears to remove entries from the heap
View SPLHeap_Issue.md

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;
You can’t perform that action at this time.