Skip to content

Instantly share code, notes, and snippets.

@suzuki0keiichi
Created November 16, 2012 10:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save suzuki0keiichi/4086394 to your computer and use it in GitHub Desktop.
Save suzuki0keiichi/4086394 to your computer and use it in GitHub Desktop.
素のPHPとQuercusの挙動の違い
<?php
class Hoge {
public $foo = null;
public $bar = 'this is bar';
public function __get($name) {
return "this is __get";
}
}
$baz = new Hoge();
echo($baz->foo . "<br>\n");
echo($baz->bar . "<br>\n");
echo(property_exists($baz, 'foo') . "<br>\n");
echo(property_exists($baz, 'bar') . "<br>\n");
@suzuki0keiichi
Copy link
Author

素のPHPだと↓のような出力になるが

this is bar
1
1

Quercusでは↓のような出力になる。

this is __get
this is bar

1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment