Skip to content

Instantly share code, notes, and snippets.

@tomekwojcik
Created April 10, 2012 08:52
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tomekwojcik/2349469 to your computer and use it in GitHub Desktop.
Save tomekwojcik/2349469 to your computer and use it in GitHub Desktop.
PHP...
<?php
class string {
protected $_src = null;
public function __construct($src = '') {
$this->_src = $src;
}
public function __toString() {
return $this->_src;
}
}
function foo(string $str) { echo($str); }
$test = new string('dupa');
foo($test);
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment