-
Notifications
You must be signed in to change notification settings - Fork 0
/
idchar.php
79 lines (69 loc) · 1.61 KB
/
idchar.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
<?php
include "identichar.class.php";
use Picknology\verbalize\IDENTICHAR;
$parser = new IDENTICHAR();
//var_dump($parser);
/*
$azRange = range('A', 'Z');
foreach ($azRange as $letter)
{
print("$letter\n");
echo strtolower($letter)."\n";
}
*/
$string = "ejJOk039#)!~|";
//
////$str = "String to loop through"
//$strlen = strlen( $string );
//echo "length: " .$strlen."\n";
//for( $i = 0; $i <= $strlen; $i++ ) {
// if($i != $strlen) {
//
// $char = substr( $string, $i, 1 );
// // $char contains the current character, so do your processing here
// //echo "char: " .$char."\t";
// echo "testing: " .$i.". char: ".$char."\n";
// if (ctype_alpha($char)) {
// echo " is alpha | ";
// if (ctype_upper($char)) {
// echo " is uppercase\n";
// $prstr = "Upper-".$char;
//
// } else {
// echo " is lowercase\n";
// $prstr = "Lower-".$char;
//
// }
//
// } elseif (ctype_digit($char)) {
// echo " is numeric \n";
// $prstr = "Number-".$char;
//
// } else {
// echo " is special \n";
// $prstr = $chars[$char];
//
// }
// }
// echo "verbal string: " .$prstr."\n";
// $verbalstr[] = $prstr;
//}
$vstr = $parser->parseString($string);
//var_dump($parser::$chars);
//var_dump($chars);
//echo "chars ~: ".$chars['~']."\n";
//echo "String: ";
//$cntvstr = count($verbalstr);
//$x=0;
//$kp="";
//foreach ($verbalstr as $vstr) {
//
// //echo $vstr;
// if($cntvstr != $x) {
// $kp .= $vstr;
// $kp .= ", ";
// $x++;
// }
//}
//echo "kp: " .$kp."\n";
echo "vstr: " .$vstr."\n";