使用Notepad++開發PHP的程式設計師可能會發現編輯器並沒有對PHP的關鍵字函式進行變色的動作,關鍵字的擴充必需手動增加字串於langs.model.xml和langs.xml,所以我利用之前寫的phpKeyword的類別,抓了官方所有的函式關鍵字後將他加到檔案中了,若需要的客倌請服用

Notepad++ php keywords.zip

這檔案抓取了所有的關鍵字,所以第一次重新開啟Notepad++會感覺當掉,請耐心等待,之後再重開就不會有這種情況了。

如果你覺得沒必要那麼多的函式關鍵字,那麼可以直接參考我之前的類別,重新去抓取所需要的關鍵字即可。(囧rz…因為我不知道哪些才算是常用的,所以就全抓了)


If you are the PHP developer that used Notepad++ editor,you maybe detect the php keywords won't be highlight.So We must be add the php keywords into files "langs.model.xml" and "langs.xml" ourselves.

I use my class "phpKeyword" to catch the all funciton keywords from PHP official web and update(or upgrade?XD) the langs files. Now,you can download and replace old langs files in Notepad++ directory.

Notepad++ php keywords.zip

It will take some time to reload notepad++ editor like crash in first time after replace old langs files. You should backup the old langs file before replace them.

網友bcsephpKeyword的類別那篇回應跟我說PHP原來有get_defined_constants, get_defined_functions, get_declared_interfaces, get_declared_classes, get_extension_funcs, get_class_methods, spl_classes這麼內建函式,XD,看來我繞了一大圈,所以其它的網友若是要抓比較正式而且輕量些的,就試試用get_defined_functions得到的值,重抓關鍵字吧!(=_=因為我發現我從官方抓的數量好像比使用get_defined_functions還多)。

預期你會寫到的程式只有一行如下:

echo join(' ',get_defined_functions());
接著就把這個字串貼到lang.xml的正確位置即可
arrow
arrow
    全站熱搜

    低溫烘培 發表在 痞客邦 留言(1) 人氣()