Skip to content

Instantly share code, notes, and snippets.

@MarkBaker
MarkBaker / anonymousFactory.php
Created January 29, 2016 09:49
Dynamic Instantiation of a class with optional Traits
<?php
class baseClass {
protected $a;
protected $b;
public function __construct($a, $b = null) {
$this->a = $a;
$this->b = $b;
}
@MarkBaker
MarkBaker / PHPSpreadsheetCalculationTest.md
Last active May 17, 2022 21:55
The following code can be used to submit an issue with the PHPSpreadsheet calculation engine
<?php

use PhpOffice\PhpSpreadsheet\Spreadsheet;
use PhpOffice\PhpSpreadsheet\Calculation\Calculation;

error_reporting(E_ALL);
set_time_limit(0);

date_default_timezone_set('UTC');