Created
November 16, 2012 10:54
-
-
Save suzuki0keiichi/4086394 to your computer and use it in GitHub Desktop.
素のPHPとQuercusの挙動の違い
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
素のPHPだと↓のような出力になるが
this is bar
1
1
Quercusでは↓のような出力になる。
this is __get
this is bar
1