Skip to content

Instantly share code, notes, and snippets.

View whatthejeff's full-sized avatar

Jeff Welch whatthejeff

  • Onnit Labs, Inc.
  • Austin, TX
View GitHub Profile
@whatthejeff
whatthejeff / composer.json
Created March 8, 2013 06:02
Autoloading PEAR packages with composer.
{
"require": {
"pear-pear/pear": "1.9.4",
"pear-pear/Mail_Mime": "1.8.7"
},
"repositories": [
{
"type": "pear",
"url": "http://pear.php.net"
}
@whatthejeff
whatthejeff / .travis.yml
Created August 18, 2013 13:00
.travis.yaml for PHP extensions
language: php
php:
- 5.3
- 5.4
- 5.5
before_script:
- phpize
- ./configure --enable-EXTENSION_NAME
@whatthejeff
whatthejeff / missing-modifiers.diff
Last active December 18, 2015 13:38
Added modifiers for a number of PHP methods.
Index: en/reference/spl/splheap/current.xml
===================================================================
--- en/reference/spl/splheap/current.xml (revision 330515)
+++ en/reference/spl/splheap/current.xml (working copy)
@@ -9,7 +9,7 @@
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
- <type>mixed</type><methodname>SplHeap::current</methodname>
+ <modifier>public</modifier> <type>mixed</type><methodname>SplHeap::current</methodname>
@whatthejeff
whatthejeff / errors.php
Created May 15, 2013 06:51
PHP's error constants
<?php
$errors = [
'E_ERROR',
'E_WARNING',
'E_PARSE',
'E_NOTICE',
'E_CORE_ERROR',
'E_CORE_WARNING',
'E_COMPILE_ERROR',
<?php
// PHPUnit 3.7
$mock->expects($this->any())->method('doSomething')->will($this->returnValue('something'))
// PHPUnit 4.0
$mock->method('doSomething')->willReturn('something');