Created
April 10, 2012 08:52
-
-
Save tomekwojcik/2349469 to your computer and use it in GitHub Desktop.
PHP...
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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