变量,函数
一,關(guān)鍵字global
二,變量的生命周期
a)???????? 概念
b)???????? 靜態(tài)局部變量:加上關(guān)鍵字static
三,函數(shù)的遞歸調(diào)用
a)???????? 概念:就是在函數(shù)執(zhí)行的時(shí)候自己調(diào)用自己
b)???????? 遞歸有兩個(gè)要素:遞歸出口,遞歸點(diǎn),一般先寫(xiě)遞歸出口,再寫(xiě)遞歸點(diǎn)
c)???????? 特點(diǎn):代碼書(shū)寫(xiě)比較簡(jiǎn)單,本質(zhì)上就是以空間換取時(shí)間
d)???????? 案例“斐波那契數(shù)列”,“n的階乘”,“表白神器”
四,迭代思想:就是從前往后思考問(wèn)題,體現(xiàn)在代碼上就是循環(huán)結(jié)構(gòu)
五,字符串函數(shù):strlen、substr、strtoupper、strtolower、strrev、strpos、strrpos、strchr、strrchr、trim、str_replace、str_repeat
六,時(shí)間函數(shù)
a)???????? time
b)???????? date
c)???????? strtotime
d)???????? microtime
七,數(shù)學(xué)函數(shù)
a)???????? abs
b)???????? sqrt
c)???????? pow
d)???????? ceil|floor
e)???????? rand|mt_rand
f)????????? round
g)???????? 三角函數(shù)
h)???????? 反三角函數(shù)
i)?????????? 對(duì)數(shù)函數(shù)log(自然對(duì)數(shù)),log10(以10為底的對(duì)數(shù))
八,數(shù)組
a)???????? 數(shù)組創(chuàng)建:顯式創(chuàng)建和隱式創(chuàng)建
b)???????? 數(shù)組訪問(wèn)
c)???????? 數(shù)組分類(lèi)
???????????????????????? i.????????????? 按鍵值對(duì)之間的對(duì)應(yīng)關(guān)系:索引數(shù)組和關(guān)聯(lián)數(shù)組
?????????????????????? ii.????????????? 按數(shù)組的維度:一維和多維
d)???????? foreach遍歷
轉(zhuǎn)載于:https://www.cnblogs.com/phpindex/p/6093489.html
總結(jié)
- 上一篇: 《数据结构与算法Python语言描述》习
- 下一篇: [转]tesseract OCR Eng