Skip to content

Instantly share code, notes, and snippets.

@tamasd
Created February 27, 2012 15:08
Show Gist options
  • Save tamasd/1924439 to your computer and use it in GitHub Desktop.
Save tamasd/1924439 to your computer and use it in GitHub Desktop.
Playing around with extract()
<?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