我在wordpress主题中遇到了这个函数。
function get( $key ) {
if ( method_exists( $this, \'get_\' . $key ) ) {
return call_user_func_array( array( $this, \'get_\' . $key ), array() );
} elseif ( property_exists( $this, $key ) ) {
return $this->{$key};
}
return false;
}
为什么$this中需要{}大约$key->;{$key}?$this如何->$钥匙不正常?谢谢