请问$a = (string) $a;($ a是已经串)修改和复制任何东西?
特别是,这是我的问题:
参数1是mixed/我想允许传递非字符串并将它们转换为字符串.
但有时这些字符串非常大.所以我想省略复制param,这已经是一个字符串了.
我可以使用版本Foo还是必须使用版本Bar?
class Foo {
private $_foo;
public function __construct($foo) {
$this->_foo = (string) $foo;
}
}
class Bar {
private $_bar;
public function __construct($bar) {
if (is_string($bar)) {
$this->_bar = $bar;
} else {
$this->_bar = (string) $bar;
}
}
}
Run Code Online (Sandbox Code Playgroud) 每次我请求.php文件时,我都会收到500错误代码.
我尝试了许多不同的文件权限并搜索了整个互联网(或者至少,感觉就像这样),但我找不到任何有用的东西.(这不是一个容易找到suexec错误或类似的东西.但我想,这是权限的东西......可能我只是不知道/某一点......)
/var/log/apache2/error.log(LogLevel info)
[Tue Sep 11 12:47:21 2012] [info] Init: Seeding PRNG with 648 bytes of entropy
[Tue Sep 11 12:47:21 2012] [info] Init: Generating temporary RSA private keys (512/1024 bits)
[Tue Sep 11 12:47:21 2012] [info] Init: Generating temporary DH parameters (512/1024 bits)
[Tue Sep 11 12:47:21 2012] [info] Init: Initializing (virtual) servers for SSL
[Tue Sep 11 12:47:21 2012] [info] mod_ssl/2.2.16 compiled against Server: Apache/2.2.16, Library: OpenSSL/0.9.8o
[Tue Sep 11 12:47:21 2012] [notice] suEXEC mechanism enabled (wrapper: …Run Code Online (Sandbox Code Playgroud)