Skip to content

Instantly share code, notes, and snippets.

@fcaravana
fcaravana / gist:b8bffe670cfe20210b83
Last active August 29, 2015 14:21
Understanding and Applying Polymorphism in PHP
/*
Understanding and Applying Polymorphism in PHP:
http://code.tutsplus.com/tutorials/understanding-and-applying-polymorphism-in-php--net-14362
*/
interface MyInterface {
// methods
}
/* challenges */
// HELLO WORLD
// __________________________________________
/* COMPLETED:
console.log('HELLO WORLD');
*/
@fcaravana
fcaravana / PriorityCalculator.php
Last active August 29, 2015 14:03
weight calculator
<?php
/**
* From a list of items with priorities gets one based on their priority.
*/
class PriorityCalculator
{
public var $data = array();
public var $universe = 0;