⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 001.phpt

📁 PHP v6.0 For Linux 运行环境:Win9X/ WinME/ WinNT/ Win2K/ WinXP
💻 PHPT
字号:
--TEST--pspell basic tests (warning: may fail with pspell/aspell < GNU Aspell 0.50.3)--SKIPIF--<?php if (!extension_loaded("pspell")) die("skip");if (!@pspell_new ("en", "", "", "", (PSPELL_FAST|PSPELL_RUN_TOGETHER))) {	die("skip English dictionary is not available");}?>--FILE--<?php // $Id: 001.phpt,v 1.2 2006/06/28 14:42:32 nlopess Exp $error_reporting(E_ALL);$string = "";$string .= "I will not buy this record, it is scratched. ";$string .= "Sorry ";$string .= "I will not buy this record, it is scratched. ";$string .= "Uh, no, no, no. This is a tobacconist's ";$string .= "Ah! I will not buy this tobacconist's, it is scratched. ";$string .= "No, no, no, no. Tobacco... um... cigarettes (holds up a pack). ";$string .= "Ya! See-gar-ets! Ya! Uh... My hovercraft is full of eels. ";$string .= "Sorry? ";$string .= "My hovercraft (pantomimes puffing a cigarette)... is full of eels (pretends to strike a match). ";$string .= "Ahh, matches!";$pspell = pspell_new ("en", "", "", "", (PSPELL_FAST|PSPELL_RUN_TOGETHER));$array = explode(' ',preg_replace('/[^a-zA-Z0-9 ]/','',$string));for($i=0,$u=count($array);$i<$u;++$i) {    echo $array[$i].' : ';    if (!pspell_check($pspell, $array[$i])) {        echo "..false\n";        echo "Possible spellings: " . join(',',pspell_suggest ($pspell, $array[$i])) . "\n";     } else {        echo "true\n";    }}?>--EXPECTF--I : truewill : truenot : truebuy : truethis : truerecord : trueit : trueis : truescratched : trueSorry : trueI : truewill : truenot : truebuy : truethis : truerecord : trueit : trueis : truescratched : trueUh : trueno : trueno : trueno : trueThis : trueis : truea : truetobacconists : trueAh : trueI : truewill : truenot : truebuy : truethis : truetobacconists : trueit : trueis : truescratched : trueNo : trueno : trueno : trueno : trueTobacco : trueum : truecigarettes : trueholds : trueup : truea : truepack : trueYa : trueSeegarets : ..falsePossible spellings:%s,Regrets,%s,Cigarettes,%sYa : trueUh : trueMy : truehovercraft : trueis : truefull : trueof : trueeels : trueSorry : trueMy : truehovercraft : truepantomimes : truepuffing : truea : truecigarette : trueis : truefull : trueof : trueeels : truepretends : trueto : truestrike : truea : truematch : trueAhh : ..falsePossible spellings:%sAh,Aha,%smatches : true

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -