锟斤拷锟斤拷锟铰的讹拷锟斤拷锟斤拷锟斤拷, object, 锟斤拷锟斤拷锟剿匡拷锟斤拷锟斤拷锟斤拷洌╟ontravariant锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟叫拷洌╟ovariant锟斤拷锟斤拷锟斤拷锟轿何讹拷锟斤拷锟斤拷锟酵★拷
<?php
function test(object $obj) : object
{
return new SplQueue();
}
test(new StdClass());
锟斤拷展锟侥硷拷锟斤拷锟斤拷锟斤拷要通锟斤拷锟侥硷拷锟斤拷锟斤拷 (Unix锟斤拷锟斤拷.so为锟侥硷拷锟斤拷展锟斤拷锟斤拷锟斤拷Windows锟斤拷锟斤拷 .dll 为锟侥硷拷锟斤拷展锟斤拷) 锟斤拷锟斤拷指锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷php.ini锟斤拷锟斤拷锟侥硷拷锟斤拷锟斤拷锟斤拷锟斤拷, 也锟斤拷锟斤拷使锟斤拷 dl() 锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟矫★拷
锟斤拷一锟斤拷锟斤拷锟斤拷锟斤拷坛锟斤拷锟斤拷锟斤拷锟揭伙拷锟斤拷锟斤拷锟斤拷锟斤拷时锟津,继承猴拷某锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷写锟斤拷锟教承的筹拷锟斤拷锟斤拷某锟斤拷蠓椒锟斤拷锟�
<?php
abstract class A
{
abstract function test(string $s);
}
abstract class B extends A
{
// overridden - still maintaining contravariance for parameters and covariance for return
abstract function test($s) : int;
}
Argon2 锟窖撅拷锟斤拷锟斤拷锟诫到锟斤拷锟斤拷散锟叫o拷password hashing锟斤拷 API (锟斤拷些锟斤拷锟斤拷锟斤拷 password_ 锟斤拷头), 锟斤拷锟斤拷锟角憋拷露锟斤拷锟斤拷锟侥筹拷锟斤拷:
PASSWORD_ARGON2I
PASSWORD_ARGON2_DEFAULT_MEMORY_COST
PASSWORD_ARGON2_DEFAULT_TIME_COST
PASSWORD_ARGON2_DEFAULT_THREADS
锟斤拷锟斤拷准锟斤拷支锟街讹拷锟斤拷锟斤拷锟街凤拷锟斤拷锟斤拷PDO锟斤拷锟街凤拷锟斤拷锟斤拷锟斤拷锟窖撅拷锟斤拷展支锟街癸拷锟绞伙拷锟斤拷锟街凤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷展锟侥筹拷锟斤拷锟斤拷
PDO::PARAM_STR_NATL
PDO::PARAM_STR_CHAR
PDO::ATTR_DEFAULT_STR_PARAM
锟斤拷些锟斤拷锟斤拷通锟斤拷PDO::PARAM_STR
锟斤拷锟斤拷位锟斤拷锟斤拷OR锟斤拷锟叫硷拷锟姐:
<?php
$db->quote('锟斤拷ber', PDO::PARAM_STR | PDO::PARAM_STR_NATL);
PDOStatement::debugDumpParams()锟斤拷锟斤拷锟窖撅拷锟斤拷锟铰o拷锟斤拷锟斤拷锟斤拷SQL锟斤拷锟斤拷锟捷匡拷锟绞憋拷锟斤拷锟揭伙拷锟斤拷浴锟斤拷胁锟窖拷锟斤拷锟斤拷锟斤拷婊伙拷锟秸嘉伙拷锟斤拷锟斤拷锟斤拷锟斤拷锟绞撅拷锟斤拷锟斤拷锟较拷锟斤拷锟揭伙拷锟斤拷锟斤拷丫锟斤拷锟斤拷氲侥o拷锟斤拷锟斤拷锟叫o拷锟斤拷模锟斤拷锟斤拷源锟绞憋拷锟斤拷茫锟斤拷锟�
LDAP 锟斤拷展锟窖撅拷锟斤拷锟斤拷锟斤拷EXOP支锟斤拷. 锟斤拷展锟斤拷露锟斤拷锟铰猴拷锟斤拷锟酵筹拷锟斤拷:
LDAP_EXOP_START_TLS
LDAP_EXOP_MODIFY_PASSWD
LDAP_EXOP_REFRESH
LDAP_EXOP_WHO_AM_I
LDAP_EXOP_TURN
sockets锟斤拷展锟斤拷锟节撅拷锟叫诧拷锟揭碉拷址锟斤拷息锟斤拷锟斤拷锟斤拷锟斤拷锟揭匡拷锟斤拷锟斤拷锟接碉拷锟斤拷锟斤拷锟街凤拷锟斤拷锟斤拷呓锟斤拷邪蠖ê徒锟斤拷锟斤拷锟轿拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷一些锟斤拷锟斤拷:
锟斤拷写锟斤拷锟斤拷锟酵接匡拷实锟街的诧拷锟斤拷锟斤拷锟斤拷锟斤拷锟节匡拷锟斤拷省锟斤拷锟剿★拷锟斤拷锟斤拷锟斤拷锟斤拷然锟角凤拷锟斤拷LSP锟斤拷锟斤拷为锟斤拷锟斤拷锟斤拷锟街诧拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟侥★拷
<?php
interface A
{
public function Test(array $input);
}
class B implements A
{
public function Test($input){} // type omitted for $input
}
锟斤拷锟斤拷锟秸硷拷锟斤拷锟斤拷锟絇HP 7锟斤拷使锟斤拷尾锟芥逗锟脚斤拷锟叫凤拷锟斤拷锟斤拷锟诫。
<?php
use Foo\Bar\{
Foo,
Bar,
Baz,
};