Skip to content

Commit

Permalink
php-ext v0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
duguying committed Nov 7, 2013
1 parent 20c7e69 commit 4e6287d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 11 deletions.
7 changes: 4 additions & 3 deletions pinyin.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ ZEND_GET_MODULE(pinyin)

PHP_MINIT_FUNCTION(pinyin)
{
zval dict;
ZEND_SET_GLOBAL_VAR(name, dict)
// zval dict;
// ZEND_SET_GLOBAL_VAR(name, dict)
return SUCCESS;
}

Expand All @@ -85,7 +85,8 @@ PHP_MINFO_FUNCTION(pinyin)
php_info_print_table_start();
php_info_print_table_header(2, "pinyin support", "enabled");
php_info_print_table_row(2, "author", "Rex Lee");
php_info_print_table_row(2, "version", "0.1");
php_info_print_table_row(2, "version", "0.2");
php_info_print_table_row(2, "function", "pinyin(void) return a array which is a dictionary.");
php_info_print_table_end();

}
Expand Down
8 changes: 6 additions & 2 deletions pinyin.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
<?php
set_time_limit(0);

pinyin("");
$dict=pinyin();

?>
echo "<pre>";
foreach ($dict as $key => $value) {
echo "汉字: $key 拼音: $value\n";
}
echo "</pre>";
6 changes: 0 additions & 6 deletions test.cmd

This file was deleted.

0 comments on commit 4e6287d

Please sign in to comment.