Skip to content

Instantly share code, notes, and snippets.

@MarkBaker
MarkBaker / PHPExcel_Formula_Debugging.md
Last active April 17, 2018 15:58
PHPExcel formula debugging (prior to 1.7.9)

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 March 31, 2016 05:00
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;