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

📄 01pspell_basic.phpt

📁 php-4.4.7学习linux时下载的源代码
💻 PHPT
字号:
--TEST--pspell basic tests (warning: may fail with pspell/aspell < GNU Aspell 0.50.3)--SKIPIF--<?php 	if (!extension_loaded("pspell")) print "skip"; 	if (!@pspell_new ("en", "", "", "", (PSPELL_FAST|PSPELL_RUN_TOGETHER))) {		die("skip English dictionary is not available");	}?>--POST----GET----FILE--<?php // $Id: 01pspell_basic.phpt,v 1.2.2.3 2004/12/16 12:36:42 sniper 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";        $suggestions = pspell_suggest ($pspell, $array[$i]);        foreach ($suggestions as $suggestion) {            echo "Possible spelling: $suggestion\n";         }    } else {        echo "true\n";    }}?>--EXPECT--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 spelling: SecretsPossible spelling: RegretsPossible spelling: SecretesPossible spelling: EgretsPossible spelling: Segre'sPossible spelling: Seagate'sPossible spelling: RegreetsPossible spelling: SegregatesPossible spelling: SergeantsPossible spelling: SugariestPossible spelling: GarretsPossible spelling: SocratesPossible spelling: Egret'sPossible spelling: SeparatesPossible spelling: CigarettesPossible spelling: SugaredPossible spelling: ScarletsYa : 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 spelling: ShhPossible spelling: AhPossible spelling: AhaPossible spelling: AshPossible spelling: Hamatches : true

⌨️ 快捷键说明

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