Skip to content

Instantly share code, notes, and snippets.

View coastwise's full-sized avatar

Patrick McKenna coastwise

  • Mississauga, Ontario, Canada
View GitHub Profile
@coastwise
coastwise / Bcrypt.php
Created June 11, 2012 13:58
Simple PHP 5.3+ Bcrypt class
<?php
/*
By Marco Arment <me@marco.org>.
This code is released in the public domain.
THERE IS ABSOLUTELY NO WARRANTY.
*/
class Bcrypt {
@coastwise
coastwise / gist:2725710
Created May 18, 2012 14:57
Codeception vs PHPUnit

We are testing a simple controller from imaginable MVC framework.

<?php
class UserController extends AbtractController {

    public function show($id)
    {
        $user = $this->db->find('users',$id);
        if (!$user) return $this->render404('User not found');