Skip to content

Instantly share code, notes, and snippets.

@hikari-no-yume
Created December 14, 2014 02:40
Show Gist options
  • Save hikari-no-yume/613b8ec4c629b945f92f to your computer and use it in GitHub Desktop.
Save hikari-no-yume/613b8ec4c629b945f92f to your computer and use it in GitHub Desktop.
stringable (used for the sake of example in demonstrating casts in PHP)
<?php
class Stringable {
public $string;
public function __construct($string) {
$this->string = $string;
}
public function __toString() {
return $this->string;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment