Skip to content

Instantly share code, notes, and snippets.

@docteurklein
Forked from Herzult/WhatTheFuck.php
Created February 22, 2011 12:46
Show Gist options
  • Save docteurklein/838619 to your computer and use it in GitHub Desktop.
Save docteurklein/838619 to your computer and use it in GitHub Desktop.
<?php
class Test
{
public function whatTheFuck()
{
${'thi' . 's'} = 'tata';
$name = 'this';
var_dump($this);
var_dump($$name);
var_dump($this->getThis());
var_dump($$name->getThis()); // Fatal error!
}
public function getThis()
{
return $this;
}
}
$t = new Test();
$t->whatTheFuck();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment