Skip to content

Instantly share code, notes, and snippets.

Mark Baker MarkBaker

Block or report user

Report or block MarkBaker

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
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.