PHP? ?? ?????? ?? ?????? Python? ??? ??? ??? ?? ????? ?? ??? ??? ??? ????? ? ? ????. ?? ?? ??? ?? ???? ???? ?? ? ? ??? ?? ??, ??? ?? ?? ? ???? ?? ??? ????? ?? ?? ?? ??? ??? ?????.
- PHP? , ? ?????? ??? ???, ?? ?? ??? ? ?? ??? ???? ? ??? ?????. ? ?????? ??? ?, ??? ?? ?? ? ID? ?? ??? ??? ? ??? ??? ?? ?? ???? ???? ????? ??? ??? ??? ? ??? ? ????.
-
?? ??
? ?? ?? ??? : Countable
??? ???? ?? ?? ?? (PHP? ??)? ???? ??? ???? ?? ? ? ????. ArrayAccess
??? ??? ? ???? Iterator
??? :count()
SPL ? PHP ????? ? ?? ??>
PHP? ????? ??? ?????? ???? ??? ??? ???? ?? ??? ?? ?? ? ????? ?????? ?????.
? ??? ????? ??? ???? ????. ??? ?? ???.
? ??> <<> ????? ???? ???? ???
? ??> <<> ?????
????
<,>? ???? ??? ??? ?? ??? ???? ??? ???? ?? ??? ??? ?????. ???? ??? ? ??? ? ??? ??? ?? ? ?? ??? ??? ID? ????? ???? ?? ??? ????. ???? ???? ????. ?? 10 ?? ??? ?? ??? ??? ???? ???? ?? ?? 10 ?? ??? ????.
? ??>
??? ???! ??? ??? ??? ?? ??? ?? ???? ?????. API ??? ?????? ?? ??? ?? ?? ? ??? ?? ? ??? ?????? ???? ?? ???????. ???? ??? ??? ? ??? ??? ??? ??? ? ??? ? ????. ??? ?????. ?? class Members {
public function __construct(array $members) {
$this->members = $members;
}
// 其他方法
}
???? ??????. ??? ?? ??? ?? ???? ???? ???? : ? ??>. __iter__
class Members implements Iterator {
private $members;
private $position = 0;
public function __construct(array $members) {
$this->members = $members;
}
public function current() {
return $this->members[$this->position];
}
public function key() {
return $this->position;
}
public function next() {
$this->position++;
}
public function rewind() {
$this->position = 0;
}
public function valid() {
return isset($this->members[$this->position]);
}
}
$ls = new Members(["你", "我"]);
foreach ($ls as $member) {
echo $member . "\n";
}
??? ????? ? ??? ?? ?? ? ????? ? ??? ??? ???? ??? ??? ?? PHP ????? (SPL)? ???? ????. __contains__
? ??????. class Members {
public function __construct(array $members) {
$this->members = $members;
}
public function contains($member) {
return in_array($member, $this->members);
}
}
$members = new Members(["你", "我"]);
if ($members->contains("我")) {
echo "我是一個(gè)成員!\n";
}
???, ??? ??? SPL? isset($myObject["test"]);
? ?? ????
class Members {
public function __construct(array $members) {
$this->members = $members;
}
// 其他方法
}
class Members implements Iterator {
private $members;
private $position = 0;
public function __construct(array $members) {
$this->members = $members;
}
public function current() {
return $this->members[$this->position];
}
public function key() {
return $this->position;
}
public function next() {
$this->position++;
}
public function rewind() {
$this->position = 0;
}
public function valid() {
return isset($this->members[$this->position]);
}
}
$ls = new Members(["你", "我"]);
foreach ($ls as $member) {
echo $member . "\n";
}
class Members {
public function __construct(array $members) {
$this->members = $members;
}
public function contains($member) {
return in_array($member, $this->members);
}
}
$members = new Members(["你", "我"]);
if ($members->contains("我")) {
echo "我是一個(gè)成員!\n";
}
? ??????. ???? ???? ?? ?? SitePoint? ?? ??? ??????. ??? ?? ??? OAUTH ???? ??????. isset($myObject["test"]);
<<> ?????? ??? ?? ?? ? ? ????. composer install
index.php
?? ? <<>? ??? ??? ??? ? ??????. ???? ??? ? ???? ?? ? ? ????.
Countable
?????? ?? ID? ?? ??? ???????. Countable
? ??>? ??? ?? ? ? ????. count
count()
? ???? interface Multiplier {
public function multiply($num1, $num2);
}
? ??> <<> ?????
ArrayAccess
?????? ???? ?? ?????. ???? ?? ?????. ???? ???? ??? ???? ?? ?? ?? ?? ??? ???? ??? ?? ?? ??? ??? ?? ??? ????? ? ?? ??? ?? ?????. ArrayAccess
rewind
class Members {
public function __construct(array $members) {
$this->members = $members;
}
// 其他方法
}
???? ??? ????? ??? ???? ?? ?????. ?? ??? ?? ??? ???? ?? ? ? ????.
valid()
? class Members implements Iterator {
private $members;
private $position = 0;
public function __construct(array $members) {
$this->members = $members;
}
public function current() {
return $this->members[$this->position];
}
public function key() {
return $this->position;
}
public function next() {
$this->position++;
}
public function rewind() {
$this->position = 0;
}
public function valid() {
return isset($this->members[$this->position]);
}
}
$ls = new Members(["你", "我"]);
foreach ($ls as $member) {
echo $member . "\n";
}
key()
????? current()
???. ??? ??? ??? ???? ?? ??? ???? ?? ??? ???? ?????. ?? ?? ??? ??? ??? ??? ?? ?? ??? ?? ? ????. class Members {
public function __construct(array $members) {
$this->members = $members;
}
public function contains($member) {
return in_array($member, $this->members);
}
}
$members = new Members(["你", "我"]);
if ($members->contains("我")) {
echo "我是一個(gè)成員!\n";
}
next
isset($myObject["test"]);
? ??? ?? ?????? ??? ?? ?????. ??? ??? PHP ??? ????? ?? ?? ??? ?????!

? AI ??

Undress AI Tool
??? ???? ??

Undresser.AI Undress
???? ?? ??? ??? ?? AI ?? ?

AI Clothes Remover
???? ?? ???? ??? AI ?????.

Clothoff.io
AI ? ???

Video Face Swap
??? ??? AI ?? ?? ??? ???? ?? ???? ??? ?? ????!

?? ??

??? ??

???++7.3.1
???? ?? ?? ?? ???

SublimeText3 ??? ??
??? ??, ???? ?? ????.

???? 13.0.1 ???
??? PHP ?? ?? ??

???? CS6
??? ? ?? ??

SublimeText3 Mac ??
? ??? ?? ?? ?????(SublimeText3)

????? ??? ????? ????? ??? ??? ???????. ?? ?? ??? ??? ????. 1. ??? 8 ?? ?????. 2. ??? ???, ??? ? ??? ?????. 3. ?? ?? ??? ?? ? ? ????. ?? ??? ????, ??? ???? ?? ? ??/?? ???? ?????, ?? PHP ?? ??? ?????. ???, ?????? ???? ?? ? 123456? ?? ???? ?? ??? ????????. ????? ?? ???? ????? ?? ZXCVBN ?????? ???? ?? ????.

PHP ?? ??? ?? ???? ?? ? ????? ??? ?????. 1. ?? ??? ??? ??? ??? ? ? ??? ??? ??? ?? ?? ??? ???? ???????. 2. ?? ??? ???? ???? ? ?? ????? ?? ?? ?? ??? ?????. 3. $ _get ? $ _post? ?? Hyperglobal ??? ?? ???? ?? ??? ? ??? ??? ??????? ???????. 4. ?? ?? ?? ???? ?? ?? ?? ??? ?????? ?? ??? ??? ?? ??? ???????. ??? ??? ????? ??? ??? ?? ???? ????? ? ??? ? ? ????.

PHP ?? ???? ???? ????? ?? ? ??? ???? ?? ?? ? ??? ???? ?? ??? ?????? ??? ??? ? ? ???????. 1. ??? ?? CSRF? ???? ?? ??? ??? ???? ?????? ??? ???? FINFO_FILE? ?? ?? MIME ??? ?????. 2. ??? ??? ??? ???? ??? ?? ??? ?? ? WEB ????? ??? ???? ??????. 3. PHP ?? ??? ?? ? ?? ???? NGINX/APACHE? ??? ????? ?? ???? ?????. 4. GD ?????? ??? ? ?? ???? ??? ?? ??? ?? ????.

PHP ?? ???? ? ?? ???? ??? ????. 1. // ?? #? ???? ? ?? ??? ???? // ???? ?? ????. 2. ?? /.../ ?? ?? ?? ??? ????? ?? ? ?? ??? ?? ? ? ????. 3. ?? ?? ?? / if () {} /? ?? ?? ??? ????? ??? ?? ?? ?? ??? ???? ????? ???? ??? ?? ???? ???? ??? ? ??? ??????.

Ageneratorinphpisamemory- ???? Way-Erate-Overgedatasetsetsbaluesoneatimeatimeatimeatimallatonce.1.generatorsuseTheyieldKeywordTocroadtOpvaluesondemand, RetingMemoryUsage.2

PHP ??? ???? ??? ??? ??? ????? ????. ??? ????? ?? ???? ??? "?? ? ?"??? "?"? ???????. 1. ??? ? ??? ??? DocBlock (/*/)? ?? ?? ??? ???? ??? ? ?? ???? ??????. 2. JS ??? ???? ?? ???? ??? ?? ??? ??? ?????. 3. ??? ?? ?? ?? ??? ???? ????? ????? ???? ?? ????? ???? ? ??????. 4. Todo ? Fixme? ????? ???? ? ? ??? ??? ???? ?? ?? ? ??? ???????. ??? ???? ?? ??? ??? ?? ?? ?? ???? ???? ? ????.

toinstallphpquickly, usexampponwindowsorhomebrewonmacos.1. ??, downloadandinstallxAmpp, selectComponents, startApache ? placefilesinhtdocs.2

tolearnpheffectical, startBysetTupaloCalserErverEnmentUsingToolslikexamppandacodeeditor -likevscode.1) installxamppforapache, mysql, andphp.2) useacodeeditorforsyntaxsupport.3)) 3) testimplephpfile.next, withpluclucincludechlucincluclucludechluclucled
