Skip to content

Instantly share code, notes, and snippets.

function myThing(){
// data hiding
var collection = [];
var api = {};
api.methodOne = function(params){
collection.push(params.argument);
//...
};
api.methodTwo = function(params){
var something = api.methodOne(stuff);
function myThing(){
if(!(this instanceOf myThing)){
return new myThing();
}
var private = 'blah';
var api = this;
api.methodOne = function(params){
if(private){
//...
}

Awesome PHP

A list of amazingly awesome PHP libraries, resources and shiny things.

Composer