Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class MyClass{
- public function MyMethod(array $options = array()){
- extract($options);
- }
- }
- $my = new MyClass();
- $my->MyMethod(array('name' => 'john', 'surname' => 'doe'));
- //Now MyMethod has two internal vars called $name and $surname
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement