Instantly share code, notes, and snippets.

Embed
What would you like to do?
素の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

This comment has been minimized.

Owner

suzuki0keiichi commented Nov 16, 2012

素の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