Created
February 27, 2012 15:08
-
-
Save tamasd/1924439 to your computer and use it in GitHub Desktop.
Playing around with extract()
This file contains hidden or 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 Foo { | |
protected $baz = 'baz'; | |
public function __construct($v) { | |
extract($v); | |
var_dump($this); | |
var_dump($this->baz); | |
} | |
} | |
new Foo(array('this' => 'bar')); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment