# Default function arg in class = $this?

**URL:** <https://forum.kirupa.com/t/default-function-arg-in-class-this/273275>\
**Category:** Uncategorized\
**Created:** [October 13, 2008, 9:10pm UTC](https://forum.kirupa.com/t/default-function-arg-in-class-this/273275 "2008-10-13T21:10:59Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![insaniak](https://avatars.discourse-cdn.com/v4/letter/i/ed8c4c/32.png) [@insaniak](https://forum.kirupa.com/u/insaniak)\
**Post date:** [October 13, 2008, 9:10pm UTC](https://forum.kirupa.com/t/default-function-arg-in-class-this/273275/1 "2008-10-13T21:10:59Z")

</div>

Anybody know why I can’t do this:

```php
class xyz{
    var $var1;

    function example_fn($param = $this->var1){
         echo $param;
    }
}

```

For example… 🙂
