How much fun can you have with the tenary operator ?
Well, since you can do stuff which wouldn't otherwise be possible for variable variables, it allows for much fun!
Just have a look at this "beauty"!
<?php
class test
{
public function test1()
{
echo "Inside test1()\n";
$this->{(($c=(ob_start()?(debug_print_backtrace()?false:(($bt=ob_get_contents())?(
ob_end_clean()?(($bt=str_replace(array('->','::'),' ',substr($bt,strpos($bt,"#0 "))))?(
($bt=substr($bt,0,strpos($bt,'(')))?(($bt=sscanf($bt,"#0 %s %s"))?trim($bt[(($bt[1]==NULL)?0:1)])
:false):false):false):false):false)):false))?substr($c,0,(strlen($c)-1)).($c{(strlen($c)-1)}+1):false)}();
}
public function test2()
{
echo "Inside test2()\n";
$this->{(($c=(ob_start()?(debug_print_backtrace()?false:(($bt=ob_get_contents())?(
ob_end_clean()?(($bt=str_replace(array('->','::'),' ',substr($bt,strpos($bt,"#1 "))))?(
($bt=substr($bt,0,strpos($bt,'(')))?(($bt=sscanf($bt,"#1 %s %s"))?trim($bt[(($bt[1]==NULL)?0:1)])
:false):false):false):false):false)):false))?substr($c,0,(strlen($c)-1)).($c{(strlen($c)-1)}+2):false)}();
}
public function test3()
{
echo "Inside test3()\n";
$this->{(($c=(ob_start()?(debug_print_backtrace()?false:(($bt=ob_get_contents())?(
ob_end_clean()?(($bt=str_replace(array('->','::'),' ',substr($bt,strpos($bt,"#1 "))))?(
($bt=substr($bt,0,strpos($bt,'(')))?(($bt=sscanf($bt,"#1 %s %s"))?trim($bt[(($bt[1]==NULL)?0:1)])
:false):false):false):false):false)):false))?substr($c,0,(strlen($c)-1)).($c{(strlen($c)-1)}+2):false)}();
}
public function test4()
{
echo "Inside test4()\n";
}
}
$test = new test();
$test->test1();