├── 001.md ├── 002.md ├── 003.md ├── 004.md ├── 01.md ├── 02.md ├── 03.md ├── 04.md ├── 05.md ├── 06.md ├── 07.md ├── 08.md ├── 09.md ├── 10.md ├── 11.md ├── 12.md ├── 13.md ├── 14.md ├── README.md └── codes ├── array ├── .deps ├── .libs │ ├── array.la │ ├── array.lai │ ├── array.o │ ├── array.so │ └── array.so.dSYM │ │ └── Contents │ │ ├── Info.plist │ │ └── Resources │ │ └── DWARF │ │ └── array.so ├── .svnignore ├── CREDITS ├── EXPERIMENTAL ├── Makefile ├── Makefile.fragments ├── Makefile.global ├── Makefile.objects ├── acinclude.m4 ├── aclocal.m4 ├── array.c ├── array.la ├── array.lo ├── array.php ├── autom4te.cache │ ├── output.0 │ ├── requests │ └── traces.0 ├── build │ ├── libtool.m4 │ ├── mkdep.awk │ ├── scan_makefile_in.awk │ └── shtool ├── config.guess ├── config.h ├── config.h.in ├── config.log ├── config.m4 ├── config.nice ├── config.status ├── config.sub ├── config.w32 ├── configure ├── configure.in ├── install-sh ├── libtool ├── ltmain.sh ├── missing ├── mkinstalldirs ├── modules │ └── array.so ├── php_array.h ├── run-tests.php └── tests │ └── 001.phpt ├── consts ├── .deps ├── .libs │ ├── consts.la │ ├── consts.lai │ ├── consts.o │ ├── consts.so │ └── consts.so.dSYM │ │ └── Contents │ │ ├── Info.plist │ │ └── Resources │ │ └── DWARF │ │ └── consts.so ├── .svnignore ├── CREDITS ├── EXPERIMENTAL ├── Makefile ├── Makefile.fragments ├── Makefile.global ├── Makefile.objects ├── acinclude.m4 ├── aclocal.m4 ├── autom4te.cache │ ├── output.0 │ ├── requests │ └── traces.0 ├── build │ ├── libtool.m4 │ ├── mkdep.awk │ ├── scan_makefile_in.awk │ └── shtool ├── config.guess ├── config.h ├── config.h.in ├── config.log ├── config.m4 ├── config.nice ├── config.status ├── config.sub ├── config.w32 ├── configure ├── configure.in ├── consts.c ├── consts.la ├── consts.lo ├── consts.php ├── install-sh ├── libtool ├── ltmain.sh ├── missing ├── mkinstalldirs ├── modules │ └── consts.so ├── php_consts.h ├── run-tests.php └── tests │ └── 001.phpt ├── fcall ├── .deps ├── .libs │ ├── fcall.la │ ├── fcall.lai │ ├── fcall.o │ ├── fcall.so │ └── fcall.so.dSYM │ │ └── Contents │ │ ├── Info.plist │ │ └── Resources │ │ └── DWARF │ │ └── fcall.so ├── .svnignore ├── CREDITS ├── EXPERIMENTAL ├── Makefile ├── Makefile.fragments ├── Makefile.global ├── Makefile.objects ├── acinclude.m4 ├── aclocal.m4 ├── autom4te.cache │ ├── output.0 │ ├── requests │ └── traces.0 ├── build │ ├── libtool.m4 │ ├── mkdep.awk │ ├── scan_makefile_in.awk │ └── shtool ├── config.guess ├── config.h ├── config.h.in ├── config.log ├── config.m4 ├── config.nice ├── config.status ├── config.sub ├── config.w32 ├── configure ├── configure.in ├── fcall.c ├── fcall.la ├── fcall.lo ├── fcall.php ├── install-sh ├── libtool ├── ltmain.sh ├── missing ├── mkinstalldirs ├── modules │ └── fcall.so ├── php_fcall.h ├── run-tests.php └── tests │ └── 001.phpt ├── global ├── .deps ├── .libs │ ├── global.la │ ├── global.lai │ ├── global.o │ ├── global.so │ └── global.so.dSYM │ │ └── Contents │ │ ├── Info.plist │ │ └── Resources │ │ └── DWARF │ │ └── global.so ├── .svnignore ├── CREDITS ├── EXPERIMENTAL ├── Makefile ├── Makefile.fragments ├── Makefile.global ├── Makefile.objects ├── acinclude.m4 ├── aclocal.m4 ├── autom4te.cache │ ├── output.0 │ ├── requests │ └── traces.0 ├── build │ ├── libtool.m4 │ ├── mkdep.awk │ ├── scan_makefile_in.awk │ └── shtool ├── config.guess ├── config.h ├── config.h.in ├── config.log ├── config.m4 ├── config.nice ├── config.status ├── config.sub ├── config.w32 ├── configure ├── configure.in ├── global.c ├── global.la ├── global.lo ├── global.php ├── install-sh ├── libtool ├── ltmain.sh ├── missing ├── mkinstalldirs ├── modules │ └── global.so ├── php_global.h ├── run-tests.php └── tests │ └── 001.phpt ├── globalss ├── .svnignore ├── CREDITS ├── EXPERIMENTAL ├── config.m4 ├── config.w32 ├── globalss.c ├── globalss.php ├── php_globalss.h └── tests │ └── 001.phpt ├── inis ├── .deps ├── .libs │ ├── inis.la │ ├── inis.lai │ ├── inis.o │ ├── inis.so │ └── inis.so.dSYM │ │ └── Contents │ │ ├── Info.plist │ │ └── Resources │ │ └── DWARF │ │ └── inis.so ├── .svnignore ├── CREDITS ├── EXPERIMENTAL ├── Makefile ├── Makefile.fragments ├── Makefile.global ├── Makefile.objects ├── acinclude.m4 ├── aclocal.m4 ├── autom4te.cache │ ├── output.0 │ ├── requests │ └── traces.0 ├── build │ ├── libtool.m4 │ ├── mkdep.awk │ ├── scan_makefile_in.awk │ └── shtool ├── config.guess ├── config.h ├── config.h.in ├── config.log ├── config.m4 ├── config.nice ├── config.status ├── config.sub ├── config.w32 ├── configure ├── configure.in ├── inis.c ├── inis.la ├── inis.lo ├── inis.php ├── install-sh ├── libtool ├── ltmain.sh ├── missing ├── mkinstalldirs ├── modules │ └── inis.so ├── php_inis.h ├── run-tests.php └── tests │ └── 001.phpt ├── libs ├── .deps ├── .libs │ ├── libs.la │ ├── libs.lai │ ├── libs.o │ ├── libs.so │ └── libs.so.dSYM │ │ └── Contents │ │ ├── Info.plist │ │ └── Resources │ │ └── DWARF │ │ └── libs.so ├── .svnignore ├── CREDITS ├── EXPERIMENTAL ├── Makefile ├── Makefile.fragments ├── Makefile.global ├── Makefile.objects ├── acinclude.m4 ├── aclocal.m4 ├── autom4te.cache │ ├── output.0 │ ├── requests │ └── traces.0 ├── build │ ├── libtool.m4 │ ├── mkdep.awk │ ├── scan_makefile_in.awk │ └── shtool ├── config.guess ├── config.h ├── config.h.in ├── config.log ├── config.m4 ├── config.nice ├── config.status ├── config.sub ├── config.w32 ├── configure ├── configure.in ├── install-sh ├── libs.c ├── libs.la ├── libs.lo ├── libs.php ├── libtool ├── ltmain.sh ├── missing ├── mkinstalldirs ├── modules │ └── libs.so ├── php_libs.h ├── run-tests.php └── tests │ └── 001.phpt ├── objects1 ├── .deps ├── .libs │ ├── objects1.la │ ├── objects1.lai │ ├── objects1.o │ ├── objects1.so │ └── objects1.so.dSYM │ │ └── Contents │ │ ├── Info.plist │ │ └── Resources │ │ └── DWARF │ │ └── objects1.so ├── .svnignore ├── CREDITS ├── EXPERIMENTAL ├── Makefile ├── Makefile.fragments ├── Makefile.global ├── Makefile.objects ├── acinclude.m4 ├── aclocal.m4 ├── autom4te.cache │ ├── output.0 │ ├── requests │ └── traces.0 ├── build │ ├── libtool.m4 │ ├── mkdep.awk │ ├── scan_makefile_in.awk │ └── shtool ├── config.guess ├── config.h ├── config.h.in ├── config.log ├── config.m4 ├── config.nice ├── config.status ├── config.sub ├── config.w32 ├── configure ├── configure.in ├── install-sh ├── libtool ├── ltmain.sh ├── missing ├── mkinstalldirs ├── modules │ └── objects1.so ├── objects1.c ├── objects1.la ├── objects1.lo ├── objects1.php ├── php_objects1.h ├── run-tests.php └── tests │ └── 001.phpt ├── objects2 ├── .svnignore ├── CREDITS ├── EXPERIMENTAL ├── config.m4 ├── config.w32 ├── objects2.c ├── objects2.php ├── php_objects2.h └── tests │ └── 001.phpt ├── objects3 ├── .svnignore ├── CREDITS ├── EXPERIMENTAL ├── config.m4 ├── config.w32 ├── objects3.c ├── objects3.php ├── php_objects3.h └── tests │ └── 001.phpt ├── params ├── .deps ├── .libs │ ├── params.la │ ├── params.lai │ ├── params.o │ ├── params.so │ └── params.so.dSYM │ │ └── Contents │ │ ├── Info.plist │ │ └── Resources │ │ └── DWARF │ │ └── params.so ├── .svnignore ├── CREDITS ├── EXPERIMENTAL ├── Makefile ├── Makefile.fragments ├── Makefile.global ├── Makefile.objects ├── acinclude.m4 ├── aclocal.m4 ├── autom4te.cache │ ├── output.0 │ ├── requests │ └── traces.0 ├── build │ ├── libtool.m4 │ ├── mkdep.awk │ ├── scan_makefile_in.awk │ └── shtool ├── config.guess ├── config.h ├── config.h.in ├── config.log ├── config.m4 ├── config.nice ├── config.status ├── config.sub ├── config.w32 ├── configure ├── configure.in ├── install-sh ├── libtool ├── ltmain.sh ├── missing ├── mkinstalldirs ├── modules │ └── params.so ├── params.c ├── params.la ├── params.lo ├── params.php ├── php_params.h ├── run-tests.php └── tests │ └── 001.phpt ├── php_hello ├── .deps ├── .libs │ ├── php_hello.la │ ├── php_hello.lai │ ├── php_hello.o │ ├── php_hello.so │ └── php_hello.so.dSYM │ │ └── Contents │ │ ├── Info.plist │ │ └── Resources │ │ └── DWARF │ │ └── php_hello.so ├── .svnignore ├── CREDITS ├── EXPERIMENTAL ├── Makefile ├── Makefile.fragments ├── Makefile.global ├── Makefile.objects ├── acinclude.m4 ├── aclocal.m4 ├── autom4te.cache │ ├── output.0 │ ├── requests │ └── traces.0 ├── build │ ├── libtool.m4 │ ├── mkdep.awk │ ├── scan_makefile_in.awk │ └── shtool ├── config.guess ├── config.h ├── config.h.in ├── config.log ├── config.m4 ├── config.nice ├── config.status ├── config.sub ├── config.w32 ├── configure ├── configure.in ├── install-sh ├── libtool ├── ltmain.sh ├── missing ├── mkinstalldirs ├── modules │ └── php_hello.so ├── php_hello.c ├── php_hello.la ├── php_hello.lo ├── php_hello.php ├── php_php_hello.h ├── run-tests.php └── tests │ └── 001.phpt ├── resource ├── .deps ├── .libs │ ├── resource.la │ ├── resource.lai │ ├── resource.o │ ├── resource.so │ └── resource.so.dSYM │ │ └── Contents │ │ ├── Info.plist │ │ └── Resources │ │ └── DWARF │ │ └── resource.so ├── .svnignore ├── CREDITS ├── EXPERIMENTAL ├── Makefile ├── Makefile.fragments ├── Makefile.global ├── Makefile.objects ├── acinclude.m4 ├── aclocal.m4 ├── autom4te.cache │ ├── output.0 │ ├── requests │ └── traces.0 ├── build │ ├── libtool.m4 │ ├── mkdep.awk │ ├── scan_makefile_in.awk │ └── shtool ├── config.guess ├── config.h ├── config.h.in ├── config.log ├── config.m4 ├── config.nice ├── config.status ├── config.sub ├── config.w32 ├── configure ├── configure.in ├── install-sh ├── libtool ├── ltmain.sh ├── missing ├── mkinstalldirs ├── modules │ └── resource.so ├── php_resource.h ├── resource.c ├── resource.la ├── resource.lo ├── resource.php ├── run-tests.php └── tests │ └── 001.phpt ├── return ├── .deps ├── .libs │ ├── return.la │ ├── return.lai │ ├── return.o │ ├── return.so │ └── return.so.dSYM │ │ └── Contents │ │ ├── Info.plist │ │ └── Resources │ │ └── DWARF │ │ └── return.so ├── .svnignore ├── CREDITS ├── EXPERIMENTAL ├── Makefile ├── Makefile.fragments ├── Makefile.global ├── Makefile.objects ├── acinclude.m4 ├── aclocal.m4 ├── autom4te.cache │ ├── output.0 │ ├── requests │ └── traces.0 ├── build │ ├── libtool.m4 │ ├── mkdep.awk │ ├── scan_makefile_in.awk │ └── shtool ├── config.guess ├── config.h ├── config.h.in ├── config.log ├── config.m4 ├── config.nice ├── config.status ├── config.sub ├── config.w32 ├── configure ├── configure.in ├── install-sh ├── libtool ├── ltmain.sh ├── missing ├── mkinstalldirs ├── modules │ └── return.so ├── php_return.h ├── return.c ├── return.la ├── return.lo ├── return.php ├── run-tests.php └── tests │ └── 001.phpt └── zval1 ├── .svnignore ├── CREDITS ├── EXPERIMENTAL ├── config.m4 ├── config.w32 ├── php_zval1.h ├── tests └── 001.phpt ├── zval1.c └── zval1.php /01.md: -------------------------------------------------------------------------------- 1 | # 创建一个新的扩展 2 | 3 | 1,下载php源码 4 | 5 | git clone https://github.com/php/php-src.git 6 | 7 | 2,创建扩展 8 | 9 | PHP提供了一个命令用于生成扩展的基本文件架构,只要调用该命令即可。 10 | 11 | cd php-src/ext/ 12 | 13 | ./ext_skel --extname=php_hello 14 | 15 | 选择自已喜欢的编辑器,打开 php-src/ext/php_hello目录,上面的命令已经帮我们生成好了一些文件。 16 | 17 | 最主要的是 config.m4, php_php_hello.h, php_hello.c 这三个文件。 18 | 19 | config.m4 编译配置文件 20 | 21 | php_php_hello.h 扩展头文件 22 | 23 | php_hello.c 扩展源码 24 | 25 | 3,修改config.m4 26 | 27 | PHP_ARG_ENABLE(php_hello, whether to enable php_hello support, 28 | Make sure that the comment is aligned: 29 | [ --enable-php_hello Enable php_hello support]) 30 | if test "$PHP_PHP_HELLO" != "no"; then 31 | PHP_NEW_EXTENSION(php_hello, php_hello.c, $ext_shared) 32 | fi 33 | 34 | 4,修改 php_hello.c 35 | 36 | PHP_FUNCTION(confirm_php_hello_compiled) 37 | { 38 | php_printf("hello world!\n"); 39 | return; 40 | } 41 | 42 | 5,编译扩展 43 | 44 | cd php_hello 45 | phpize 46 | ./configure --with-php-config=/usr/bin/php-config 47 | make 48 | sudo make install 49 | 50 | 6,运行测试文件 51 | 52 | php -q php_hello.php 53 | 54 | 7,运行结果 55 | 56 | Functions available in the test extension: 57 | confirm_php_hello_compiled 58 | 59 | hello world! 60 | 61 | 62 | 63 | -------------------------------------------------------------------------------- /08.md: -------------------------------------------------------------------------------- 1 | # 调用php函数 2 | 3 | 1,创建新的扩展 4 | 5 | ./ext_skel --extname=fcall 6 | 7 | 2,代码 8 | 9 | typedef struct _zend_fcall_info { 10 | size_t size; 11 | HashTable *function_table; 12 | zval *function_name; 13 | HashTable *symbol_table; 14 | zval **retval_ptr_ptr; 15 | zend_uint param_count; 16 | zval ***params; 17 | zval *object_ptr; 18 | zend_bool no_separation; 19 | } zend_fcall_info; 20 | 21 | typedef struct _zend_fcall_info_cache { 22 | zend_bool initialized; 23 | zend_function *function_handler; 24 | zend_class_entry *calling_scope; 25 | zend_class_entry *called_scope; 26 | zval *object_ptr; 27 | } zend_fcall_info_cache; 28 | 29 | 30 | zend_fcall_info finfo; 31 | zend_fcall_info_cache fcache; 32 | char *name = NULL; 33 | zval **params[1]; 34 | zval *arg, *retval = NULL; 35 | 36 | zend_fcall_info_init(&fname, IS_CALLABLE_STRICT, &finfo, &fcache, &name, NULL TSRMLS_CC); //初始化fcall_info 37 | 38 | /*填充参数*/ 39 | MAKE_STD_ZVAL(arg); 40 | ZVAL_STRING(arg, "Hello World", 1); 41 | params[0] = &arg; 42 | 43 | 44 | finfo.param_count = 1; //参数数量 45 | finfo.params = params; //参数 46 | finfo.retval_ptr_ptr = &retval; //返回值 47 | 48 | /*执行函数*/ 49 | zend_call_function(&finfo, &fcache TSRMLS_CC) -------------------------------------------------------------------------------- /13.md: -------------------------------------------------------------------------------- 1 | # 包装第三方库 2 | 3 | 1,创建一个扩展 4 | 5 | ./ext_skel --extname=libs 6 | 7 | 2,配置(config.m4) 8 | 9 | SEARCH_PATH="/usr/local /usr" #lib搜索的目录 10 | SEARCH_FOR="/include/curl/curl.h" #lib头文件的路径 11 | if test -r $PHP_LIBS/$SEARCH_FOR; then 12 | LIBS_DIR=$PHP_LIBS 13 | else # search default path list 14 | AC_MSG_CHECKING([for libs files in default path]) 15 | for i in $SEARCH_PATH ; do 16 | if test -r $i/$SEARCH_FOR; then 17 | LIBS_DIR=$i #搜索到的lib的路径 18 | AC_MSG_RESULT(found in $i) 19 | fi 20 | done 21 | fi 22 | 23 | /*验证lib是否存在*/ 24 | if test -z "$LIBS_DIR"; then 25 | AC_MSG_RESULT([not found]) 26 | AC_MSG_ERROR([Please reinstall the libs distribution]) 27 | fi 28 | 29 | 30 | /*编译的时候添加lib的include目录, -I/usr/include*/ 31 | PHP_ADD_INCLUDE($LIBS_DIR/include) 32 | 33 | LIBNAME=curl #lib名称 34 | LIBSYMBOL=curl_version #lib的一个函数,用来PHP_CHECK_LIBRARY验证lib 35 | 36 | /*验证lib*/ 37 | PHP_CHECK_LIBRARY($LIBNAME,$LIBSYMBOL, 38 | [ 39 | PHP_ADD_LIBRARY_WITH_PATH($LIBNAME, $LIBS_DIR/$PHP_LIBDIR, LIBS_SHARED_LIBADD) #编译的时候链接lib, -llibcurl 40 | AC_DEFINE(HAVE_LIBSLIB,1,[ ]) 41 | ],[ 42 | AC_MSG_ERROR([wrong libs lib version or lib not found]) 43 | ],[ 44 | -L$LIBS_DIR/$PHP_LIBDIR -lm 45 | ]) 46 | 47 | 48 | PHP_SUBST(LIBS_SHARED_LIBADD) -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # PHP扩展开发笔记 2 | 3 | #### 目录 4 | 5 | [1,创建一个新的扩展](./01.md) 6 | 7 | [2,参数传递](./02.md) 8 | 9 | [3,返回值](./03.md) 10 | 11 | [4,INI参数设置](./04.md) 12 | 13 | [5,数组](./05.md) 14 | 15 | [6,Global变量](./06.md) 16 | 17 | [7,常量](./07.md) 18 | 19 | [8,调用php函数](./08.md) 20 | 21 | [9,类与对象1](./09.md) 22 | 23 | [10,类与对象2(自定义object存储)](./10.md) 24 | 25 | [11,类与对象3(object handlers)](./11.md) 26 | 27 | [12,资源](./12.md) 28 | 29 | [13,包装第三方库](./13.md) 30 | 31 | [14,output操作](./14.md) 32 | 33 | #### 附录 34 | 35 | [1,gdb调试PHP扩展函数](./001.md) 36 | 37 | [2,常用全局宏](./002.md) 38 | 39 | [3,zval](./003.md) 40 | 41 | [4,ZendMM](./004.md) 42 | 43 | ##### 参考 44 | 45 | [https://github.com/sgolemon/phptek2013](https://github.com/sgolemon/phptek2013) 46 | 47 | [http://www.walu.cc/phpbook/](http://www.walu.cc/phpbook/) 48 | 49 | [https://wikitech.wikimedia.org/wiki/GDB_with_PHP](https://wikitech.wikimedia.org/wiki/GDB_with_PHP) 50 | 51 | 52 | -------------------------------------------------------------------------------- /codes/array/.deps: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/array/.deps -------------------------------------------------------------------------------- /codes/array/.libs/array.la: -------------------------------------------------------------------------------- 1 | ../array.la -------------------------------------------------------------------------------- /codes/array/.libs/array.lai: -------------------------------------------------------------------------------- 1 | # array.la - a libtool library file 2 | # Generated by ltmain.sh - GNU libtool 1.5.26 (1.1220.2.492 2008/01/30 06:40:56) 3 | # 4 | # Please DO NOT delete this file! 5 | # It is necessary for linking the library. 6 | 7 | # The name that we can dlopen(3). 8 | dlname='array.so' 9 | 10 | # Names of this library. 11 | library_names='array.so array.so array.so' 12 | 13 | # The name of the static archive. 14 | old_library='' 15 | 16 | # Libraries that this one depends upon. 17 | dependency_libs='' 18 | 19 | # Version information for array. 20 | current=0 21 | age=0 22 | revision=0 23 | 24 | # Is this an already installed library? 25 | installed=yes 26 | 27 | # Should we warn about portability when linking against -modules? 28 | shouldnotlink=yes 29 | 30 | # Files to dlopen/dlpreopen 31 | dlopen='' 32 | dlpreopen='' 33 | 34 | # Directory that this library needs to be installed in: 35 | libdir='/Users/kentchen/GitHub/php/php-5.5.20/ext/array/modules' 36 | -------------------------------------------------------------------------------- /codes/array/.libs/array.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/array/.libs/array.o -------------------------------------------------------------------------------- /codes/array/.libs/array.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/array/.libs/array.so -------------------------------------------------------------------------------- /codes/array/.libs/array.so.dSYM/Contents/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleIdentifier 8 | com.apple.xcode.dsym.array.so 9 | CFBundleInfoDictionaryVersion 10 | 6.0 11 | CFBundlePackageType 12 | dSYM 13 | CFBundleSignature 14 | ???? 15 | CFBundleShortVersionString 16 | 1.0 17 | CFBundleVersion 18 | 1 19 | 20 | 21 | -------------------------------------------------------------------------------- /codes/array/.libs/array.so.dSYM/Contents/Resources/DWARF/array.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/array/.libs/array.so.dSYM/Contents/Resources/DWARF/array.so -------------------------------------------------------------------------------- /codes/array/.svnignore: -------------------------------------------------------------------------------- 1 | .deps 2 | *.lo 3 | *.la 4 | -------------------------------------------------------------------------------- /codes/array/CREDITS: -------------------------------------------------------------------------------- 1 | array 2 | -------------------------------------------------------------------------------- /codes/array/EXPERIMENTAL: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/array/EXPERIMENTAL -------------------------------------------------------------------------------- /codes/array/Makefile.fragments: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/array/Makefile.fragments -------------------------------------------------------------------------------- /codes/array/Makefile.objects: -------------------------------------------------------------------------------- 1 | array.lo: /Users/kentchen/GitHub/php/php-5.5.20/ext/array/array.c 2 | $(LIBTOOL) --mode=compile $(CC) -I. -I/Users/kentchen/GitHub/php/php-5.5.20/ext/array $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) -c /Users/kentchen/GitHub/php/php-5.5.20/ext/array/array.c -o array.lo 3 | $(phplibdir)/array.la: ./array.la 4 | $(LIBTOOL) --mode=install cp ./array.la $(phplibdir) 5 | 6 | ./array.la: $(shared_objects_array) $(ARRAY_SHARED_DEPENDENCIES) 7 | $(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_array) $(ARRAY_SHARED_LIBADD) 8 | 9 | -------------------------------------------------------------------------------- /codes/array/array.la: -------------------------------------------------------------------------------- 1 | # array.la - a libtool library file 2 | # Generated by ltmain.sh - GNU libtool 1.5.26 (1.1220.2.492 2008/01/30 06:40:56) 3 | # 4 | # Please DO NOT delete this file! 5 | # It is necessary for linking the library. 6 | 7 | # The name that we can dlopen(3). 8 | dlname='array.so' 9 | 10 | # Names of this library. 11 | library_names='array.so array.so array.so' 12 | 13 | # The name of the static archive. 14 | old_library='' 15 | 16 | # Libraries that this one depends upon. 17 | dependency_libs='' 18 | 19 | # Version information for array. 20 | current=0 21 | age=0 22 | revision=0 23 | 24 | # Is this an already installed library? 25 | installed=no 26 | 27 | # Should we warn about portability when linking against -modules? 28 | shouldnotlink=yes 29 | 30 | # Files to dlopen/dlpreopen 31 | dlopen='' 32 | dlpreopen='' 33 | 34 | # Directory that this library needs to be installed in: 35 | libdir='/Users/kentchen/GitHub/php/php-5.5.20/ext/array/modules' 36 | -------------------------------------------------------------------------------- /codes/array/array.lo: -------------------------------------------------------------------------------- 1 | # array.lo - a libtool object file 2 | # Generated by ltmain.sh - GNU libtool 1.5.26 (1.1220.2.492 2008/01/30 06:40:56) 3 | # 4 | # Please DO NOT delete this file! 5 | # It is necessary for linking the library. 6 | 7 | # Name of the PIC object. 8 | pic_object='.libs/array.o' 9 | 10 | # Name of the non-PIC object. 11 | non_pic_object=none 12 | 13 | -------------------------------------------------------------------------------- /codes/array/array.php: -------------------------------------------------------------------------------- 1 | "; 3 | 4 | if(!extension_loaded('array')) { 5 | dl('array.' . PHP_SHLIB_SUFFIX); 6 | } 7 | // $module = 'array'; 8 | // $functions = get_extension_funcs($module); 9 | // echo "Functions available in the test extension:$br\n"; 10 | // foreach($functions as $func) { 11 | // echo $func."$br\n"; 12 | // } 13 | 14 | 15 | array_greet(array("leon", "jack", "mike", "name"=>"dd"), array("hello", "key" => "value")); 16 | 17 | 18 | ?> 19 | -------------------------------------------------------------------------------- /codes/array/build/mkdep.awk: -------------------------------------------------------------------------------- 1 | # +----------------------------------------------------------------------+ 2 | # | PHP Version 5 | 3 | # +----------------------------------------------------------------------+ 4 | # | Copyright (c) 2000-2006 The PHP Group | 5 | # +----------------------------------------------------------------------+ 6 | # | This source file is subject to version 3.01 of the PHP license, | 7 | # | that is bundled with this package in the file LICENSE, and is | 8 | # | available through the world-wide-web at the following url: | 9 | # | http://www.php.net/license/3_01.txt | 10 | # | If you did not receive a copy of the PHP license and are unable to | 11 | # | obtain it through the world-wide-web, please send a note to | 12 | # | license@php.net so we can mail you a copy immediately. | 13 | # +----------------------------------------------------------------------+ 14 | # | Author: Sascha Schumann | 15 | # +----------------------------------------------------------------------+ 16 | # 17 | # $Id$ 18 | # 19 | # Usage: 20 | # 21 | # echo top_srcdir top_builddir srcdir CPP [CPP-ARGS] filenames | \ 22 | # awk -f mkdep.awk > dependencies 23 | 24 | 25 | { 26 | top_srcdir=$1 27 | top_builddir=$2 28 | srcdir=$3 29 | cmd=$4 30 | 31 | for (i = 5; i <= NF; i++) { 32 | if (match($i, "^-[A-Z]") == 0) 33 | break; 34 | cmd=cmd " " $i 35 | } 36 | 37 | dif=i-1 38 | 39 | for (; i <= NF; i++) 40 | filenames[i-dif]=$i 41 | 42 | no_files=NF-dif 43 | 44 | for(i = 1; i <= no_files; i++) { 45 | if (system("test -r " filenames[i]) != 0) 46 | continue 47 | 48 | target=filenames[i] 49 | sub(srcdir "/", "", target) 50 | target2=target 51 | sub("\.(c|cpp)$", ".lo", target); 52 | sub("\.(c|cpp)$", ".slo", target2); 53 | 54 | for (e in used) 55 | delete used[e] 56 | 57 | cmdx=cmd " " filenames[i] 58 | done=0 59 | while ((cmdx | getline) > 0) { 60 | if (match($0, "^# [0-9]* \".*\.h\"") != 0) { 61 | if (sub(top_srcdir, "$(top_srcdir)", $3) == 0) 62 | sub(top_builddir, "$(top_builddir)", $3) 63 | if (substr($3,2,1) != "/" && used[$3] != 1) { 64 | if (done == 0) 65 | printf(target " " target2 ":") 66 | done=1 67 | printf(" \\\n\t" substr($3,2,length($3)-2)) 68 | used[$3] = 1; 69 | } 70 | } 71 | } 72 | if (done == 1) 73 | print "\n" 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /codes/array/build/scan_makefile_in.awk: -------------------------------------------------------------------------------- 1 | BEGIN { 2 | mode=0 3 | sources="" 4 | } 5 | 6 | mode == 0 && /^LTLIBRARY_SOURCES.*\\$/ { 7 | if (match($0, "[^=]*$")) { 8 | sources=substr($0, RSTART, RLENGTH-1) 9 | } 10 | mode=1 11 | next 12 | } 13 | 14 | mode == 0 && /^LTLIBRARY_SOURCES.*/ { 15 | if (match($0, "[^=]*$")) { 16 | sources=substr($0, RSTART, RLENGTH) 17 | } 18 | } 19 | 20 | mode == 1 && /.*\\$/ { 21 | sources=sources substr($0, 0, length - 1) 22 | next 23 | } 24 | 25 | mode == 1 { 26 | sources=sources $0 27 | mode=0 28 | } 29 | 30 | END { 31 | print sources 32 | } 33 | -------------------------------------------------------------------------------- /codes/array/build/shtool: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/array/build/shtool -------------------------------------------------------------------------------- /codes/array/config.h: -------------------------------------------------------------------------------- 1 | /* config.h. Generated from config.h.in by configure. */ 2 | /* config.h.in. Generated from configure.in by autoheader. */ 3 | 4 | /* Whether to build array as dynamic module */ 5 | #define COMPILE_DL_ARRAY 1 6 | 7 | /* Define to 1 if you have the header file. */ 8 | #define HAVE_DLFCN_H 1 9 | 10 | /* Define to 1 if you have the header file. */ 11 | #define HAVE_INTTYPES_H 1 12 | 13 | /* Define to 1 if you have the header file. */ 14 | #define HAVE_MEMORY_H 1 15 | 16 | /* Define to 1 if you have the header file. */ 17 | #define HAVE_STDINT_H 1 18 | 19 | /* Define to 1 if you have the header file. */ 20 | #define HAVE_STDLIB_H 1 21 | 22 | /* Define to 1 if you have the header file. */ 23 | #define HAVE_STRINGS_H 1 24 | 25 | /* Define to 1 if you have the header file. */ 26 | #define HAVE_STRING_H 1 27 | 28 | /* Define to 1 if you have the header file. */ 29 | #define HAVE_SYS_STAT_H 1 30 | 31 | /* Define to 1 if you have the header file. */ 32 | #define HAVE_SYS_TYPES_H 1 33 | 34 | /* Define to 1 if you have the header file. */ 35 | #define HAVE_UNISTD_H 1 36 | 37 | /* Define to 1 if your C compiler doesn't accept -c and -o together. */ 38 | /* #undef NO_MINUS_C_MINUS_O */ 39 | 40 | /* Define to the address where bug reports for this package should be sent. */ 41 | #define PACKAGE_BUGREPORT "" 42 | 43 | /* Define to the full name of this package. */ 44 | #define PACKAGE_NAME "" 45 | 46 | /* Define to the full name and version of this package. */ 47 | #define PACKAGE_STRING "" 48 | 49 | /* Define to the one symbol short name of this package. */ 50 | #define PACKAGE_TARNAME "" 51 | 52 | /* Define to the home page for this package. */ 53 | #define PACKAGE_URL "" 54 | 55 | /* Define to the version of this package. */ 56 | #define PACKAGE_VERSION "" 57 | 58 | /* Define to 1 if you have the ANSI C header files. */ 59 | #define STDC_HEADERS 1 60 | -------------------------------------------------------------------------------- /codes/array/config.h.in: -------------------------------------------------------------------------------- 1 | /* config.h.in. Generated from configure.in by autoheader. */ 2 | 3 | /* Whether to build array as dynamic module */ 4 | #undef COMPILE_DL_ARRAY 5 | 6 | /* Define to 1 if you have the header file. */ 7 | #undef HAVE_DLFCN_H 8 | 9 | /* Define to 1 if you have the header file. */ 10 | #undef HAVE_INTTYPES_H 11 | 12 | /* Define to 1 if you have the header file. */ 13 | #undef HAVE_MEMORY_H 14 | 15 | /* Define to 1 if you have the header file. */ 16 | #undef HAVE_STDINT_H 17 | 18 | /* Define to 1 if you have the header file. */ 19 | #undef HAVE_STDLIB_H 20 | 21 | /* Define to 1 if you have the header file. */ 22 | #undef HAVE_STRINGS_H 23 | 24 | /* Define to 1 if you have the header file. */ 25 | #undef HAVE_STRING_H 26 | 27 | /* Define to 1 if you have the header file. */ 28 | #undef HAVE_SYS_STAT_H 29 | 30 | /* Define to 1 if you have the header file. */ 31 | #undef HAVE_SYS_TYPES_H 32 | 33 | /* Define to 1 if you have the header file. */ 34 | #undef HAVE_UNISTD_H 35 | 36 | /* Define to 1 if your C compiler doesn't accept -c and -o together. */ 37 | #undef NO_MINUS_C_MINUS_O 38 | 39 | /* Define to the address where bug reports for this package should be sent. */ 40 | #undef PACKAGE_BUGREPORT 41 | 42 | /* Define to the full name of this package. */ 43 | #undef PACKAGE_NAME 44 | 45 | /* Define to the full name and version of this package. */ 46 | #undef PACKAGE_STRING 47 | 48 | /* Define to the one symbol short name of this package. */ 49 | #undef PACKAGE_TARNAME 50 | 51 | /* Define to the home page for this package. */ 52 | #undef PACKAGE_URL 53 | 54 | /* Define to the version of this package. */ 55 | #undef PACKAGE_VERSION 56 | 57 | /* Define to 1 if you have the ANSI C header files. */ 58 | #undef STDC_HEADERS 59 | -------------------------------------------------------------------------------- /codes/array/config.m4: -------------------------------------------------------------------------------- 1 | PHP_ARG_ENABLE(array, whether to enable array support, 2 | [ --enable-array Enable array support]) 3 | 4 | if test "$PHP_ARRAY" != "no"; then 5 | PHP_NEW_EXTENSION(array, array.c, $ext_shared) 6 | fi 7 | -------------------------------------------------------------------------------- /codes/array/config.nice: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # 3 | # Created by configure 4 | 5 | './configure' \ 6 | '--with-php-config=php-config' \ 7 | "$@" 8 | -------------------------------------------------------------------------------- /codes/array/config.w32: -------------------------------------------------------------------------------- 1 | // $Id$ 2 | // vim:ft=javascript 3 | 4 | // If your extension references something external, use ARG_WITH 5 | // ARG_WITH("array", "for array support", "no"); 6 | 7 | // Otherwise, use ARG_ENABLE 8 | // ARG_ENABLE("array", "enable array support", "no"); 9 | 10 | if (PHP_ARRAY != "no") { 11 | EXTENSION("array", "array.c"); 12 | } 13 | 14 | -------------------------------------------------------------------------------- /codes/array/install-sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/array/install-sh -------------------------------------------------------------------------------- /codes/array/missing: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/array/missing -------------------------------------------------------------------------------- /codes/array/mkinstalldirs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/array/mkinstalldirs -------------------------------------------------------------------------------- /codes/array/modules/array.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/array/modules/array.so -------------------------------------------------------------------------------- /codes/array/php_array.h: -------------------------------------------------------------------------------- 1 | /* 2 | +----------------------------------------------------------------------+ 3 | | PHP Version 5 | 4 | +----------------------------------------------------------------------+ 5 | | Copyright (c) 1997-2014 The PHP Group | 6 | +----------------------------------------------------------------------+ 7 | | This source file is subject to version 3.01 of the PHP license, | 8 | | that is bundled with this package in the file LICENSE, and is | 9 | | available through the world-wide-web at the following url: | 10 | | http://www.php.net/license/3_01.txt | 11 | | If you did not receive a copy of the PHP license and are unable to | 12 | | obtain it through the world-wide-web, please send a note to | 13 | | license@php.net so we can mail you a copy immediately. | 14 | +----------------------------------------------------------------------+ 15 | | Author: | 16 | +----------------------------------------------------------------------+ 17 | */ 18 | 19 | /* $Id$ */ 20 | 21 | #ifndef PHP_ARRAY_H 22 | #define PHP_ARRAY_H 23 | 24 | extern zend_module_entry array_module_entry; 25 | #define phpext_array_ptr &array_module_entry 26 | 27 | #define PHP_ARRAY_VERSION "0.1.0" /* Replace with version number for your extension */ 28 | 29 | #ifdef PHP_WIN32 30 | # define PHP_ARRAY_API __declspec(dllexport) 31 | #elif defined(__GNUC__) && __GNUC__ >= 4 32 | # define PHP_ARRAY_API __attribute__ ((visibility("default"))) 33 | #else 34 | # define PHP_ARRAY_API 35 | #endif 36 | 37 | #ifdef ZTS 38 | #include "TSRM.h" 39 | #endif 40 | 41 | 42 | 43 | #ifdef ZTS 44 | #define ARRAY_G(v) TSRMG(array_globals_id, zend_array_globals *, v) 45 | #else 46 | #define ARRAY_G(v) (array_globals.v) 47 | #endif 48 | 49 | #endif /* PHP_ARRAY_H */ 50 | 51 | 52 | /* 53 | * Local variables: 54 | * tab-width: 4 55 | * c-basic-offset: 4 56 | * End: 57 | * vim600: noet sw=4 ts=4 fdm=marker 58 | * vim<600: noet sw=4 ts=4 59 | */ 60 | -------------------------------------------------------------------------------- /codes/array/tests/001.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | Check for array presence 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | 20 | --EXPECT-- 21 | array extension is available 22 | -------------------------------------------------------------------------------- /codes/consts/.deps: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/consts/.deps -------------------------------------------------------------------------------- /codes/consts/.libs/consts.la: -------------------------------------------------------------------------------- 1 | ../consts.la -------------------------------------------------------------------------------- /codes/consts/.libs/consts.lai: -------------------------------------------------------------------------------- 1 | # consts.la - a libtool library file 2 | # Generated by ltmain.sh - GNU libtool 1.5.26 (1.1220.2.492 2008/01/30 06:40:56) 3 | # 4 | # Please DO NOT delete this file! 5 | # It is necessary for linking the library. 6 | 7 | # The name that we can dlopen(3). 8 | dlname='consts.so' 9 | 10 | # Names of this library. 11 | library_names='consts.so consts.so consts.so' 12 | 13 | # The name of the static archive. 14 | old_library='' 15 | 16 | # Libraries that this one depends upon. 17 | dependency_libs='' 18 | 19 | # Version information for consts. 20 | current=0 21 | age=0 22 | revision=0 23 | 24 | # Is this an already installed library? 25 | installed=yes 26 | 27 | # Should we warn about portability when linking against -modules? 28 | shouldnotlink=yes 29 | 30 | # Files to dlopen/dlpreopen 31 | dlopen='' 32 | dlpreopen='' 33 | 34 | # Directory that this library needs to be installed in: 35 | libdir='/Users/kentchen/GitHub/php/php-5.5.20/ext/consts/modules' 36 | -------------------------------------------------------------------------------- /codes/consts/.libs/consts.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/consts/.libs/consts.o -------------------------------------------------------------------------------- /codes/consts/.libs/consts.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/consts/.libs/consts.so -------------------------------------------------------------------------------- /codes/consts/.libs/consts.so.dSYM/Contents/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleIdentifier 8 | com.apple.xcode.dsym.consts.so 9 | CFBundleInfoDictionaryVersion 10 | 6.0 11 | CFBundlePackageType 12 | dSYM 13 | CFBundleSignature 14 | ???? 15 | CFBundleShortVersionString 16 | 1.0 17 | CFBundleVersion 18 | 1 19 | 20 | 21 | -------------------------------------------------------------------------------- /codes/consts/.libs/consts.so.dSYM/Contents/Resources/DWARF/consts.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/consts/.libs/consts.so.dSYM/Contents/Resources/DWARF/consts.so -------------------------------------------------------------------------------- /codes/consts/.svnignore: -------------------------------------------------------------------------------- 1 | .deps 2 | *.lo 3 | *.la 4 | -------------------------------------------------------------------------------- /codes/consts/CREDITS: -------------------------------------------------------------------------------- 1 | consts 2 | -------------------------------------------------------------------------------- /codes/consts/EXPERIMENTAL: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/consts/EXPERIMENTAL -------------------------------------------------------------------------------- /codes/consts/Makefile.fragments: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/consts/Makefile.fragments -------------------------------------------------------------------------------- /codes/consts/Makefile.objects: -------------------------------------------------------------------------------- 1 | consts.lo: /Users/kentchen/GitHub/php/php-5.5.20/ext/consts/consts.c 2 | $(LIBTOOL) --mode=compile $(CC) -I. -I/Users/kentchen/GitHub/php/php-5.5.20/ext/consts $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) -c /Users/kentchen/GitHub/php/php-5.5.20/ext/consts/consts.c -o consts.lo 3 | $(phplibdir)/consts.la: ./consts.la 4 | $(LIBTOOL) --mode=install cp ./consts.la $(phplibdir) 5 | 6 | ./consts.la: $(shared_objects_consts) $(CONSTS_SHARED_DEPENDENCIES) 7 | $(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_consts) $(CONSTS_SHARED_LIBADD) 8 | 9 | -------------------------------------------------------------------------------- /codes/consts/build/mkdep.awk: -------------------------------------------------------------------------------- 1 | # +----------------------------------------------------------------------+ 2 | # | PHP Version 5 | 3 | # +----------------------------------------------------------------------+ 4 | # | Copyright (c) 2000-2006 The PHP Group | 5 | # +----------------------------------------------------------------------+ 6 | # | This source file is subject to version 3.01 of the PHP license, | 7 | # | that is bundled with this package in the file LICENSE, and is | 8 | # | available through the world-wide-web at the following url: | 9 | # | http://www.php.net/license/3_01.txt | 10 | # | If you did not receive a copy of the PHP license and are unable to | 11 | # | obtain it through the world-wide-web, please send a note to | 12 | # | license@php.net so we can mail you a copy immediately. | 13 | # +----------------------------------------------------------------------+ 14 | # | Author: Sascha Schumann | 15 | # +----------------------------------------------------------------------+ 16 | # 17 | # $Id$ 18 | # 19 | # Usage: 20 | # 21 | # echo top_srcdir top_builddir srcdir CPP [CPP-ARGS] filenames | \ 22 | # awk -f mkdep.awk > dependencies 23 | 24 | 25 | { 26 | top_srcdir=$1 27 | top_builddir=$2 28 | srcdir=$3 29 | cmd=$4 30 | 31 | for (i = 5; i <= NF; i++) { 32 | if (match($i, "^-[A-Z]") == 0) 33 | break; 34 | cmd=cmd " " $i 35 | } 36 | 37 | dif=i-1 38 | 39 | for (; i <= NF; i++) 40 | filenames[i-dif]=$i 41 | 42 | no_files=NF-dif 43 | 44 | for(i = 1; i <= no_files; i++) { 45 | if (system("test -r " filenames[i]) != 0) 46 | continue 47 | 48 | target=filenames[i] 49 | sub(srcdir "/", "", target) 50 | target2=target 51 | sub("\.(c|cpp)$", ".lo", target); 52 | sub("\.(c|cpp)$", ".slo", target2); 53 | 54 | for (e in used) 55 | delete used[e] 56 | 57 | cmdx=cmd " " filenames[i] 58 | done=0 59 | while ((cmdx | getline) > 0) { 60 | if (match($0, "^# [0-9]* \".*\.h\"") != 0) { 61 | if (sub(top_srcdir, "$(top_srcdir)", $3) == 0) 62 | sub(top_builddir, "$(top_builddir)", $3) 63 | if (substr($3,2,1) != "/" && used[$3] != 1) { 64 | if (done == 0) 65 | printf(target " " target2 ":") 66 | done=1 67 | printf(" \\\n\t" substr($3,2,length($3)-2)) 68 | used[$3] = 1; 69 | } 70 | } 71 | } 72 | if (done == 1) 73 | print "\n" 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /codes/consts/build/scan_makefile_in.awk: -------------------------------------------------------------------------------- 1 | BEGIN { 2 | mode=0 3 | sources="" 4 | } 5 | 6 | mode == 0 && /^LTLIBRARY_SOURCES.*\\$/ { 7 | if (match($0, "[^=]*$")) { 8 | sources=substr($0, RSTART, RLENGTH-1) 9 | } 10 | mode=1 11 | next 12 | } 13 | 14 | mode == 0 && /^LTLIBRARY_SOURCES.*/ { 15 | if (match($0, "[^=]*$")) { 16 | sources=substr($0, RSTART, RLENGTH) 17 | } 18 | } 19 | 20 | mode == 1 && /.*\\$/ { 21 | sources=sources substr($0, 0, length - 1) 22 | next 23 | } 24 | 25 | mode == 1 { 26 | sources=sources $0 27 | mode=0 28 | } 29 | 30 | END { 31 | print sources 32 | } 33 | -------------------------------------------------------------------------------- /codes/consts/build/shtool: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/consts/build/shtool -------------------------------------------------------------------------------- /codes/consts/config.h: -------------------------------------------------------------------------------- 1 | /* config.h. Generated from config.h.in by configure. */ 2 | /* config.h.in. Generated from configure.in by autoheader. */ 3 | 4 | /* Whether to build consts as dynamic module */ 5 | #define COMPILE_DL_CONSTS 1 6 | 7 | /* Define to 1 if you have the header file. */ 8 | #define HAVE_DLFCN_H 1 9 | 10 | /* Define to 1 if you have the header file. */ 11 | #define HAVE_INTTYPES_H 1 12 | 13 | /* Define to 1 if you have the header file. */ 14 | #define HAVE_MEMORY_H 1 15 | 16 | /* Define to 1 if you have the header file. */ 17 | #define HAVE_STDINT_H 1 18 | 19 | /* Define to 1 if you have the header file. */ 20 | #define HAVE_STDLIB_H 1 21 | 22 | /* Define to 1 if you have the header file. */ 23 | #define HAVE_STRINGS_H 1 24 | 25 | /* Define to 1 if you have the header file. */ 26 | #define HAVE_STRING_H 1 27 | 28 | /* Define to 1 if you have the header file. */ 29 | #define HAVE_SYS_STAT_H 1 30 | 31 | /* Define to 1 if you have the header file. */ 32 | #define HAVE_SYS_TYPES_H 1 33 | 34 | /* Define to 1 if you have the header file. */ 35 | #define HAVE_UNISTD_H 1 36 | 37 | /* Define to 1 if your C compiler doesn't accept -c and -o together. */ 38 | /* #undef NO_MINUS_C_MINUS_O */ 39 | 40 | /* Define to the address where bug reports for this package should be sent. */ 41 | #define PACKAGE_BUGREPORT "" 42 | 43 | /* Define to the full name of this package. */ 44 | #define PACKAGE_NAME "" 45 | 46 | /* Define to the full name and version of this package. */ 47 | #define PACKAGE_STRING "" 48 | 49 | /* Define to the one symbol short name of this package. */ 50 | #define PACKAGE_TARNAME "" 51 | 52 | /* Define to the home page for this package. */ 53 | #define PACKAGE_URL "" 54 | 55 | /* Define to the version of this package. */ 56 | #define PACKAGE_VERSION "" 57 | 58 | /* Define to 1 if you have the ANSI C header files. */ 59 | #define STDC_HEADERS 1 60 | -------------------------------------------------------------------------------- /codes/consts/config.h.in: -------------------------------------------------------------------------------- 1 | /* config.h.in. Generated from configure.in by autoheader. */ 2 | 3 | /* Whether to build consts as dynamic module */ 4 | #undef COMPILE_DL_CONSTS 5 | 6 | /* Define to 1 if you have the header file. */ 7 | #undef HAVE_DLFCN_H 8 | 9 | /* Define to 1 if you have the header file. */ 10 | #undef HAVE_INTTYPES_H 11 | 12 | /* Define to 1 if you have the header file. */ 13 | #undef HAVE_MEMORY_H 14 | 15 | /* Define to 1 if you have the header file. */ 16 | #undef HAVE_STDINT_H 17 | 18 | /* Define to 1 if you have the header file. */ 19 | #undef HAVE_STDLIB_H 20 | 21 | /* Define to 1 if you have the header file. */ 22 | #undef HAVE_STRINGS_H 23 | 24 | /* Define to 1 if you have the header file. */ 25 | #undef HAVE_STRING_H 26 | 27 | /* Define to 1 if you have the header file. */ 28 | #undef HAVE_SYS_STAT_H 29 | 30 | /* Define to 1 if you have the header file. */ 31 | #undef HAVE_SYS_TYPES_H 32 | 33 | /* Define to 1 if you have the header file. */ 34 | #undef HAVE_UNISTD_H 35 | 36 | /* Define to 1 if your C compiler doesn't accept -c and -o together. */ 37 | #undef NO_MINUS_C_MINUS_O 38 | 39 | /* Define to the address where bug reports for this package should be sent. */ 40 | #undef PACKAGE_BUGREPORT 41 | 42 | /* Define to the full name of this package. */ 43 | #undef PACKAGE_NAME 44 | 45 | /* Define to the full name and version of this package. */ 46 | #undef PACKAGE_STRING 47 | 48 | /* Define to the one symbol short name of this package. */ 49 | #undef PACKAGE_TARNAME 50 | 51 | /* Define to the home page for this package. */ 52 | #undef PACKAGE_URL 53 | 54 | /* Define to the version of this package. */ 55 | #undef PACKAGE_VERSION 56 | 57 | /* Define to 1 if you have the ANSI C header files. */ 58 | #undef STDC_HEADERS 59 | -------------------------------------------------------------------------------- /codes/consts/config.m4: -------------------------------------------------------------------------------- 1 | PHP_ARG_ENABLE(consts, whether to enable consts support, 2 | [ --enable-consts Enable consts support]) 3 | 4 | if test "$PHP_CONSTS" != "no"; then 5 | PHP_NEW_EXTENSION(consts, consts.c, $ext_shared) 6 | fi 7 | -------------------------------------------------------------------------------- /codes/consts/config.nice: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # 3 | # Created by configure 4 | 5 | './configure' \ 6 | '--with-php-config=php-config' \ 7 | "$@" 8 | -------------------------------------------------------------------------------- /codes/consts/config.w32: -------------------------------------------------------------------------------- 1 | // $Id$ 2 | // vim:ft=javascript 3 | 4 | // If your extension references something external, use ARG_WITH 5 | // ARG_WITH("consts", "for consts support", "no"); 6 | 7 | // Otherwise, use ARG_ENABLE 8 | // ARG_ENABLE("consts", "enable consts support", "no"); 9 | 10 | if (PHP_CONSTS != "no") { 11 | EXTENSION("consts", "consts.c"); 12 | } 13 | 14 | -------------------------------------------------------------------------------- /codes/consts/consts.la: -------------------------------------------------------------------------------- 1 | # consts.la - a libtool library file 2 | # Generated by ltmain.sh - GNU libtool 1.5.26 (1.1220.2.492 2008/01/30 06:40:56) 3 | # 4 | # Please DO NOT delete this file! 5 | # It is necessary for linking the library. 6 | 7 | # The name that we can dlopen(3). 8 | dlname='consts.so' 9 | 10 | # Names of this library. 11 | library_names='consts.so consts.so consts.so' 12 | 13 | # The name of the static archive. 14 | old_library='' 15 | 16 | # Libraries that this one depends upon. 17 | dependency_libs='' 18 | 19 | # Version information for consts. 20 | current=0 21 | age=0 22 | revision=0 23 | 24 | # Is this an already installed library? 25 | installed=no 26 | 27 | # Should we warn about portability when linking against -modules? 28 | shouldnotlink=yes 29 | 30 | # Files to dlopen/dlpreopen 31 | dlopen='' 32 | dlpreopen='' 33 | 34 | # Directory that this library needs to be installed in: 35 | libdir='/Users/kentchen/GitHub/php/php-5.5.20/ext/consts/modules' 36 | -------------------------------------------------------------------------------- /codes/consts/consts.lo: -------------------------------------------------------------------------------- 1 | # consts.lo - a libtool object file 2 | # Generated by ltmain.sh - GNU libtool 1.5.26 (1.1220.2.492 2008/01/30 06:40:56) 3 | # 4 | # Please DO NOT delete this file! 5 | # It is necessary for linking the library. 6 | 7 | # Name of the PIC object. 8 | pic_object='.libs/consts.o' 9 | 10 | # Name of the non-PIC object. 11 | non_pic_object=none 12 | 13 | -------------------------------------------------------------------------------- /codes/consts/consts.php: -------------------------------------------------------------------------------- 1 | "; 3 | 4 | if(!extension_loaded('consts')) { 5 | dl('consts.' . PHP_SHLIB_SUFFIX); 6 | } 7 | 8 | echo "CONSTS_MEANING_OF_LIFE:" . CONSTS_MEANING_OF_LIFE."\n"; 9 | echo "CONSTS_PI:".CONSTS_PI."\n"; 10 | echo "CONSTS_NAME:".CONSTS_NAME."\n"; 11 | 12 | echo "CONSTS_RAND:".CONSTS_RAND."\n"; 13 | 14 | echo "CONSTS_RAND_1:".CONSTS_RAND_1."\n"; 15 | ?> 16 | -------------------------------------------------------------------------------- /codes/consts/install-sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/consts/install-sh -------------------------------------------------------------------------------- /codes/consts/missing: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/consts/missing -------------------------------------------------------------------------------- /codes/consts/mkinstalldirs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/consts/mkinstalldirs -------------------------------------------------------------------------------- /codes/consts/modules/consts.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/consts/modules/consts.so -------------------------------------------------------------------------------- /codes/consts/tests/001.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | Check for consts presence 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | 20 | --EXPECT-- 21 | consts extension is available 22 | -------------------------------------------------------------------------------- /codes/fcall/.deps: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/fcall/.deps -------------------------------------------------------------------------------- /codes/fcall/.libs/fcall.la: -------------------------------------------------------------------------------- 1 | ../fcall.la -------------------------------------------------------------------------------- /codes/fcall/.libs/fcall.lai: -------------------------------------------------------------------------------- 1 | # fcall.la - a libtool library file 2 | # Generated by ltmain.sh - GNU libtool 1.5.26 (1.1220.2.492 2008/01/30 06:40:56) 3 | # 4 | # Please DO NOT delete this file! 5 | # It is necessary for linking the library. 6 | 7 | # The name that we can dlopen(3). 8 | dlname='fcall.so' 9 | 10 | # Names of this library. 11 | library_names='fcall.so fcall.so fcall.so' 12 | 13 | # The name of the static archive. 14 | old_library='' 15 | 16 | # Libraries that this one depends upon. 17 | dependency_libs='' 18 | 19 | # Version information for fcall. 20 | current=0 21 | age=0 22 | revision=0 23 | 24 | # Is this an already installed library? 25 | installed=yes 26 | 27 | # Should we warn about portability when linking against -modules? 28 | shouldnotlink=yes 29 | 30 | # Files to dlopen/dlpreopen 31 | dlopen='' 32 | dlpreopen='' 33 | 34 | # Directory that this library needs to be installed in: 35 | libdir='/Users/kentchen/GitHub/php/php-5.5.20/ext/fcall/modules' 36 | -------------------------------------------------------------------------------- /codes/fcall/.libs/fcall.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/fcall/.libs/fcall.o -------------------------------------------------------------------------------- /codes/fcall/.libs/fcall.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/fcall/.libs/fcall.so -------------------------------------------------------------------------------- /codes/fcall/.libs/fcall.so.dSYM/Contents/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleIdentifier 8 | com.apple.xcode.dsym.fcall.so 9 | CFBundleInfoDictionaryVersion 10 | 6.0 11 | CFBundlePackageType 12 | dSYM 13 | CFBundleSignature 14 | ???? 15 | CFBundleShortVersionString 16 | 1.0 17 | CFBundleVersion 18 | 1 19 | 20 | 21 | -------------------------------------------------------------------------------- /codes/fcall/.libs/fcall.so.dSYM/Contents/Resources/DWARF/fcall.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/fcall/.libs/fcall.so.dSYM/Contents/Resources/DWARF/fcall.so -------------------------------------------------------------------------------- /codes/fcall/.svnignore: -------------------------------------------------------------------------------- 1 | .deps 2 | *.lo 3 | *.la 4 | -------------------------------------------------------------------------------- /codes/fcall/CREDITS: -------------------------------------------------------------------------------- 1 | fcall 2 | -------------------------------------------------------------------------------- /codes/fcall/EXPERIMENTAL: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/fcall/EXPERIMENTAL -------------------------------------------------------------------------------- /codes/fcall/Makefile.fragments: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/fcall/Makefile.fragments -------------------------------------------------------------------------------- /codes/fcall/Makefile.objects: -------------------------------------------------------------------------------- 1 | fcall.lo: /Users/kentchen/GitHub/php/php-5.5.20/ext/fcall/fcall.c 2 | $(LIBTOOL) --mode=compile $(CC) -I. -I/Users/kentchen/GitHub/php/php-5.5.20/ext/fcall $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) -c /Users/kentchen/GitHub/php/php-5.5.20/ext/fcall/fcall.c -o fcall.lo 3 | $(phplibdir)/fcall.la: ./fcall.la 4 | $(LIBTOOL) --mode=install cp ./fcall.la $(phplibdir) 5 | 6 | ./fcall.la: $(shared_objects_fcall) $(FCALL_SHARED_DEPENDENCIES) 7 | $(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_fcall) $(FCALL_SHARED_LIBADD) 8 | 9 | -------------------------------------------------------------------------------- /codes/fcall/build/mkdep.awk: -------------------------------------------------------------------------------- 1 | # +----------------------------------------------------------------------+ 2 | # | PHP Version 5 | 3 | # +----------------------------------------------------------------------+ 4 | # | Copyright (c) 2000-2006 The PHP Group | 5 | # +----------------------------------------------------------------------+ 6 | # | This source file is subject to version 3.01 of the PHP license, | 7 | # | that is bundled with this package in the file LICENSE, and is | 8 | # | available through the world-wide-web at the following url: | 9 | # | http://www.php.net/license/3_01.txt | 10 | # | If you did not receive a copy of the PHP license and are unable to | 11 | # | obtain it through the world-wide-web, please send a note to | 12 | # | license@php.net so we can mail you a copy immediately. | 13 | # +----------------------------------------------------------------------+ 14 | # | Author: Sascha Schumann | 15 | # +----------------------------------------------------------------------+ 16 | # 17 | # $Id$ 18 | # 19 | # Usage: 20 | # 21 | # echo top_srcdir top_builddir srcdir CPP [CPP-ARGS] filenames | \ 22 | # awk -f mkdep.awk > dependencies 23 | 24 | 25 | { 26 | top_srcdir=$1 27 | top_builddir=$2 28 | srcdir=$3 29 | cmd=$4 30 | 31 | for (i = 5; i <= NF; i++) { 32 | if (match($i, "^-[A-Z]") == 0) 33 | break; 34 | cmd=cmd " " $i 35 | } 36 | 37 | dif=i-1 38 | 39 | for (; i <= NF; i++) 40 | filenames[i-dif]=$i 41 | 42 | no_files=NF-dif 43 | 44 | for(i = 1; i <= no_files; i++) { 45 | if (system("test -r " filenames[i]) != 0) 46 | continue 47 | 48 | target=filenames[i] 49 | sub(srcdir "/", "", target) 50 | target2=target 51 | sub("\.(c|cpp)$", ".lo", target); 52 | sub("\.(c|cpp)$", ".slo", target2); 53 | 54 | for (e in used) 55 | delete used[e] 56 | 57 | cmdx=cmd " " filenames[i] 58 | done=0 59 | while ((cmdx | getline) > 0) { 60 | if (match($0, "^# [0-9]* \".*\.h\"") != 0) { 61 | if (sub(top_srcdir, "$(top_srcdir)", $3) == 0) 62 | sub(top_builddir, "$(top_builddir)", $3) 63 | if (substr($3,2,1) != "/" && used[$3] != 1) { 64 | if (done == 0) 65 | printf(target " " target2 ":") 66 | done=1 67 | printf(" \\\n\t" substr($3,2,length($3)-2)) 68 | used[$3] = 1; 69 | } 70 | } 71 | } 72 | if (done == 1) 73 | print "\n" 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /codes/fcall/build/scan_makefile_in.awk: -------------------------------------------------------------------------------- 1 | BEGIN { 2 | mode=0 3 | sources="" 4 | } 5 | 6 | mode == 0 && /^LTLIBRARY_SOURCES.*\\$/ { 7 | if (match($0, "[^=]*$")) { 8 | sources=substr($0, RSTART, RLENGTH-1) 9 | } 10 | mode=1 11 | next 12 | } 13 | 14 | mode == 0 && /^LTLIBRARY_SOURCES.*/ { 15 | if (match($0, "[^=]*$")) { 16 | sources=substr($0, RSTART, RLENGTH) 17 | } 18 | } 19 | 20 | mode == 1 && /.*\\$/ { 21 | sources=sources substr($0, 0, length - 1) 22 | next 23 | } 24 | 25 | mode == 1 { 26 | sources=sources $0 27 | mode=0 28 | } 29 | 30 | END { 31 | print sources 32 | } 33 | -------------------------------------------------------------------------------- /codes/fcall/build/shtool: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/fcall/build/shtool -------------------------------------------------------------------------------- /codes/fcall/config.h: -------------------------------------------------------------------------------- 1 | /* config.h. Generated from config.h.in by configure. */ 2 | /* config.h.in. Generated from configure.in by autoheader. */ 3 | 4 | /* Whether to build fcall as dynamic module */ 5 | #define COMPILE_DL_FCALL 1 6 | 7 | /* Define to 1 if you have the header file. */ 8 | #define HAVE_DLFCN_H 1 9 | 10 | /* Define to 1 if you have the header file. */ 11 | #define HAVE_INTTYPES_H 1 12 | 13 | /* Define to 1 if you have the header file. */ 14 | #define HAVE_MEMORY_H 1 15 | 16 | /* Define to 1 if you have the header file. */ 17 | #define HAVE_STDINT_H 1 18 | 19 | /* Define to 1 if you have the header file. */ 20 | #define HAVE_STDLIB_H 1 21 | 22 | /* Define to 1 if you have the header file. */ 23 | #define HAVE_STRINGS_H 1 24 | 25 | /* Define to 1 if you have the header file. */ 26 | #define HAVE_STRING_H 1 27 | 28 | /* Define to 1 if you have the header file. */ 29 | #define HAVE_SYS_STAT_H 1 30 | 31 | /* Define to 1 if you have the header file. */ 32 | #define HAVE_SYS_TYPES_H 1 33 | 34 | /* Define to 1 if you have the header file. */ 35 | #define HAVE_UNISTD_H 1 36 | 37 | /* Define to 1 if your C compiler doesn't accept -c and -o together. */ 38 | /* #undef NO_MINUS_C_MINUS_O */ 39 | 40 | /* Define to the address where bug reports for this package should be sent. */ 41 | #define PACKAGE_BUGREPORT "" 42 | 43 | /* Define to the full name of this package. */ 44 | #define PACKAGE_NAME "" 45 | 46 | /* Define to the full name and version of this package. */ 47 | #define PACKAGE_STRING "" 48 | 49 | /* Define to the one symbol short name of this package. */ 50 | #define PACKAGE_TARNAME "" 51 | 52 | /* Define to the home page for this package. */ 53 | #define PACKAGE_URL "" 54 | 55 | /* Define to the version of this package. */ 56 | #define PACKAGE_VERSION "" 57 | 58 | /* Define to 1 if you have the ANSI C header files. */ 59 | #define STDC_HEADERS 1 60 | -------------------------------------------------------------------------------- /codes/fcall/config.h.in: -------------------------------------------------------------------------------- 1 | /* config.h.in. Generated from configure.in by autoheader. */ 2 | 3 | /* Whether to build fcall as dynamic module */ 4 | #undef COMPILE_DL_FCALL 5 | 6 | /* Define to 1 if you have the header file. */ 7 | #undef HAVE_DLFCN_H 8 | 9 | /* Define to 1 if you have the header file. */ 10 | #undef HAVE_INTTYPES_H 11 | 12 | /* Define to 1 if you have the header file. */ 13 | #undef HAVE_MEMORY_H 14 | 15 | /* Define to 1 if you have the header file. */ 16 | #undef HAVE_STDINT_H 17 | 18 | /* Define to 1 if you have the header file. */ 19 | #undef HAVE_STDLIB_H 20 | 21 | /* Define to 1 if you have the header file. */ 22 | #undef HAVE_STRINGS_H 23 | 24 | /* Define to 1 if you have the header file. */ 25 | #undef HAVE_STRING_H 26 | 27 | /* Define to 1 if you have the header file. */ 28 | #undef HAVE_SYS_STAT_H 29 | 30 | /* Define to 1 if you have the header file. */ 31 | #undef HAVE_SYS_TYPES_H 32 | 33 | /* Define to 1 if you have the header file. */ 34 | #undef HAVE_UNISTD_H 35 | 36 | /* Define to 1 if your C compiler doesn't accept -c and -o together. */ 37 | #undef NO_MINUS_C_MINUS_O 38 | 39 | /* Define to the address where bug reports for this package should be sent. */ 40 | #undef PACKAGE_BUGREPORT 41 | 42 | /* Define to the full name of this package. */ 43 | #undef PACKAGE_NAME 44 | 45 | /* Define to the full name and version of this package. */ 46 | #undef PACKAGE_STRING 47 | 48 | /* Define to the one symbol short name of this package. */ 49 | #undef PACKAGE_TARNAME 50 | 51 | /* Define to the home page for this package. */ 52 | #undef PACKAGE_URL 53 | 54 | /* Define to the version of this package. */ 55 | #undef PACKAGE_VERSION 56 | 57 | /* Define to 1 if you have the ANSI C header files. */ 58 | #undef STDC_HEADERS 59 | -------------------------------------------------------------------------------- /codes/fcall/config.m4: -------------------------------------------------------------------------------- 1 | PHP_ARG_ENABLE(fcall, whether to enable fcall support, 2 | [ --enable-fcall Enable fcall support]) 3 | 4 | if test "$PHP_FCALL" != "no"; then 5 | PHP_NEW_EXTENSION(fcall, fcall.c, $ext_shared) 6 | fi 7 | -------------------------------------------------------------------------------- /codes/fcall/config.nice: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # 3 | # Created by configure 4 | 5 | './configure' \ 6 | '--with-php-config=php-config' \ 7 | "$@" 8 | -------------------------------------------------------------------------------- /codes/fcall/config.w32: -------------------------------------------------------------------------------- 1 | // $Id$ 2 | // vim:ft=javascript 3 | 4 | // If your extension references something external, use ARG_WITH 5 | // ARG_WITH("fcall", "for fcall support", "no"); 6 | 7 | // Otherwise, use ARG_ENABLE 8 | // ARG_ENABLE("fcall", "enable fcall support", "no"); 9 | 10 | if (PHP_FCALL != "no") { 11 | EXTENSION("fcall", "fcall.c"); 12 | } 13 | 14 | -------------------------------------------------------------------------------- /codes/fcall/fcall.la: -------------------------------------------------------------------------------- 1 | # fcall.la - a libtool library file 2 | # Generated by ltmain.sh - GNU libtool 1.5.26 (1.1220.2.492 2008/01/30 06:40:56) 3 | # 4 | # Please DO NOT delete this file! 5 | # It is necessary for linking the library. 6 | 7 | # The name that we can dlopen(3). 8 | dlname='fcall.so' 9 | 10 | # Names of this library. 11 | library_names='fcall.so fcall.so fcall.so' 12 | 13 | # The name of the static archive. 14 | old_library='' 15 | 16 | # Libraries that this one depends upon. 17 | dependency_libs='' 18 | 19 | # Version information for fcall. 20 | current=0 21 | age=0 22 | revision=0 23 | 24 | # Is this an already installed library? 25 | installed=no 26 | 27 | # Should we warn about portability when linking against -modules? 28 | shouldnotlink=yes 29 | 30 | # Files to dlopen/dlpreopen 31 | dlopen='' 32 | dlpreopen='' 33 | 34 | # Directory that this library needs to be installed in: 35 | libdir='/Users/kentchen/GitHub/php/php-5.5.20/ext/fcall/modules' 36 | -------------------------------------------------------------------------------- /codes/fcall/fcall.lo: -------------------------------------------------------------------------------- 1 | # fcall.lo - a libtool object file 2 | # Generated by ltmain.sh - GNU libtool 1.5.26 (1.1220.2.492 2008/01/30 06:40:56) 3 | # 4 | # Please DO NOT delete this file! 5 | # It is necessary for linking the library. 6 | 7 | # Name of the PIC object. 8 | pic_object='.libs/fcall.o' 9 | 10 | # Name of the non-PIC object. 11 | non_pic_object=none 12 | 13 | -------------------------------------------------------------------------------- /codes/fcall/fcall.php: -------------------------------------------------------------------------------- 1 | "; 3 | 4 | if(!extension_loaded('fcall')) { 5 | dl('fcall.' . PHP_SHLIB_SUFFIX); 6 | } 7 | 8 | function callback($msg) { 9 | $ret = "msg:".$msg . "\n"; 10 | echo $ret; 11 | } 12 | 13 | 14 | echo fcall_byname()."\n"; 15 | 16 | echo fcall_bycallback("callback")."\n"; 17 | 18 | 19 | ?> 20 | -------------------------------------------------------------------------------- /codes/fcall/install-sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/fcall/install-sh -------------------------------------------------------------------------------- /codes/fcall/missing: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/fcall/missing -------------------------------------------------------------------------------- /codes/fcall/mkinstalldirs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/fcall/mkinstalldirs -------------------------------------------------------------------------------- /codes/fcall/modules/fcall.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/fcall/modules/fcall.so -------------------------------------------------------------------------------- /codes/fcall/php_fcall.h: -------------------------------------------------------------------------------- 1 | /* 2 | +----------------------------------------------------------------------+ 3 | | PHP Version 5 | 4 | +----------------------------------------------------------------------+ 5 | | Copyright (c) 1997-2014 The PHP Group | 6 | +----------------------------------------------------------------------+ 7 | | This source file is subject to version 3.01 of the PHP license, | 8 | | that is bundled with this package in the file LICENSE, and is | 9 | | available through the world-wide-web at the following url: | 10 | | http://www.php.net/license/3_01.txt | 11 | | If you did not receive a copy of the PHP license and are unable to | 12 | | obtain it through the world-wide-web, please send a note to | 13 | | license@php.net so we can mail you a copy immediately. | 14 | +----------------------------------------------------------------------+ 15 | | Author: | 16 | +----------------------------------------------------------------------+ 17 | */ 18 | 19 | /* $Id$ */ 20 | 21 | #ifndef PHP_FCALL_H 22 | #define PHP_FCALL_H 23 | 24 | extern zend_module_entry fcall_module_entry; 25 | #define phpext_fcall_ptr &fcall_module_entry 26 | 27 | #define PHP_FCALL_VERSION "0.1.0" /* Replace with version number for your extension */ 28 | 29 | #ifdef PHP_WIN32 30 | # define PHP_FCALL_API __declspec(dllexport) 31 | #elif defined(__GNUC__) && __GNUC__ >= 4 32 | # define PHP_FCALL_API __attribute__ ((visibility("default"))) 33 | #else 34 | # define PHP_FCALL_API 35 | #endif 36 | 37 | #ifdef ZTS 38 | #include "TSRM.h" 39 | #endif 40 | 41 | 42 | PHP_FUNCTION(fcall_byname); 43 | PHP_FUNCTION(fcall_bycallback); 44 | 45 | 46 | 47 | #ifdef ZTS 48 | #define FCALL_G(v) TSRMG(fcall_globals_id, zend_fcall_globals *, v) 49 | #else 50 | #define FCALL_G(v) (fcall_globals.v) 51 | #endif 52 | 53 | #endif /* PHP_FCALL_H */ 54 | 55 | 56 | /* 57 | * Local variables: 58 | * tab-width: 4 59 | * c-basic-offset: 4 60 | * End: 61 | * vim600: noet sw=4 ts=4 fdm=marker 62 | * vim<600: noet sw=4 ts=4 63 | */ 64 | -------------------------------------------------------------------------------- /codes/fcall/tests/001.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | Check for fcall presence 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | 20 | --EXPECT-- 21 | fcall extension is available 22 | -------------------------------------------------------------------------------- /codes/global/.deps: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/global/.deps -------------------------------------------------------------------------------- /codes/global/.libs/global.la: -------------------------------------------------------------------------------- 1 | ../global.la -------------------------------------------------------------------------------- /codes/global/.libs/global.lai: -------------------------------------------------------------------------------- 1 | # global.la - a libtool library file 2 | # Generated by ltmain.sh - GNU libtool 1.5.26 (1.1220.2.492 2008/01/30 06:40:56) 3 | # 4 | # Please DO NOT delete this file! 5 | # It is necessary for linking the library. 6 | 7 | # The name that we can dlopen(3). 8 | dlname='global.so' 9 | 10 | # Names of this library. 11 | library_names='global.so global.so global.so' 12 | 13 | # The name of the static archive. 14 | old_library='' 15 | 16 | # Libraries that this one depends upon. 17 | dependency_libs='' 18 | 19 | # Version information for global. 20 | current=0 21 | age=0 22 | revision=0 23 | 24 | # Is this an already installed library? 25 | installed=yes 26 | 27 | # Should we warn about portability when linking against -modules? 28 | shouldnotlink=yes 29 | 30 | # Files to dlopen/dlpreopen 31 | dlopen='' 32 | dlpreopen='' 33 | 34 | # Directory that this library needs to be installed in: 35 | libdir='/Users/kentchen/GitHub/php/php-5.5.20/ext/global/modules' 36 | -------------------------------------------------------------------------------- /codes/global/.libs/global.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/global/.libs/global.o -------------------------------------------------------------------------------- /codes/global/.libs/global.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/global/.libs/global.so -------------------------------------------------------------------------------- /codes/global/.libs/global.so.dSYM/Contents/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleIdentifier 8 | com.apple.xcode.dsym.global.so 9 | CFBundleInfoDictionaryVersion 10 | 6.0 11 | CFBundlePackageType 12 | dSYM 13 | CFBundleSignature 14 | ???? 15 | CFBundleShortVersionString 16 | 1.0 17 | CFBundleVersion 18 | 1 19 | 20 | 21 | -------------------------------------------------------------------------------- /codes/global/.libs/global.so.dSYM/Contents/Resources/DWARF/global.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/global/.libs/global.so.dSYM/Contents/Resources/DWARF/global.so -------------------------------------------------------------------------------- /codes/global/.svnignore: -------------------------------------------------------------------------------- 1 | .deps 2 | *.lo 3 | *.la 4 | -------------------------------------------------------------------------------- /codes/global/CREDITS: -------------------------------------------------------------------------------- 1 | global 2 | -------------------------------------------------------------------------------- /codes/global/EXPERIMENTAL: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/global/EXPERIMENTAL -------------------------------------------------------------------------------- /codes/global/Makefile.fragments: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/global/Makefile.fragments -------------------------------------------------------------------------------- /codes/global/Makefile.objects: -------------------------------------------------------------------------------- 1 | global.lo: /Users/kentchen/GitHub/php/php-5.5.20/ext/global/global.c 2 | $(LIBTOOL) --mode=compile $(CC) -I. -I/Users/kentchen/GitHub/php/php-5.5.20/ext/global $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) -c /Users/kentchen/GitHub/php/php-5.5.20/ext/global/global.c -o global.lo 3 | $(phplibdir)/global.la: ./global.la 4 | $(LIBTOOL) --mode=install cp ./global.la $(phplibdir) 5 | 6 | ./global.la: $(shared_objects_global) $(GLOBAL_SHARED_DEPENDENCIES) 7 | $(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_global) $(GLOBAL_SHARED_LIBADD) 8 | 9 | -------------------------------------------------------------------------------- /codes/global/build/scan_makefile_in.awk: -------------------------------------------------------------------------------- 1 | BEGIN { 2 | mode=0 3 | sources="" 4 | } 5 | 6 | mode == 0 && /^LTLIBRARY_SOURCES.*\\$/ { 7 | if (match($0, "[^=]*$")) { 8 | sources=substr($0, RSTART, RLENGTH-1) 9 | } 10 | mode=1 11 | next 12 | } 13 | 14 | mode == 0 && /^LTLIBRARY_SOURCES.*/ { 15 | if (match($0, "[^=]*$")) { 16 | sources=substr($0, RSTART, RLENGTH) 17 | } 18 | } 19 | 20 | mode == 1 && /.*\\$/ { 21 | sources=sources substr($0, 0, length - 1) 22 | next 23 | } 24 | 25 | mode == 1 { 26 | sources=sources $0 27 | mode=0 28 | } 29 | 30 | END { 31 | print sources 32 | } 33 | -------------------------------------------------------------------------------- /codes/global/build/shtool: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/global/build/shtool -------------------------------------------------------------------------------- /codes/global/config.h: -------------------------------------------------------------------------------- 1 | /* config.h. Generated from config.h.in by configure. */ 2 | /* config.h.in. Generated from configure.in by autoheader. */ 3 | 4 | /* Whether to build global as dynamic module */ 5 | #define COMPILE_DL_GLOBAL 1 6 | 7 | /* Define to 1 if you have the header file. */ 8 | #define HAVE_DLFCN_H 1 9 | 10 | /* Define to 1 if you have the header file. */ 11 | #define HAVE_INTTYPES_H 1 12 | 13 | /* Define to 1 if you have the header file. */ 14 | #define HAVE_MEMORY_H 1 15 | 16 | /* Define to 1 if you have the header file. */ 17 | #define HAVE_STDINT_H 1 18 | 19 | /* Define to 1 if you have the header file. */ 20 | #define HAVE_STDLIB_H 1 21 | 22 | /* Define to 1 if you have the header file. */ 23 | #define HAVE_STRINGS_H 1 24 | 25 | /* Define to 1 if you have the header file. */ 26 | #define HAVE_STRING_H 1 27 | 28 | /* Define to 1 if you have the header file. */ 29 | #define HAVE_SYS_STAT_H 1 30 | 31 | /* Define to 1 if you have the header file. */ 32 | #define HAVE_SYS_TYPES_H 1 33 | 34 | /* Define to 1 if you have the header file. */ 35 | #define HAVE_UNISTD_H 1 36 | 37 | /* Define to 1 if your C compiler doesn't accept -c and -o together. */ 38 | /* #undef NO_MINUS_C_MINUS_O */ 39 | 40 | /* Define to the address where bug reports for this package should be sent. */ 41 | #define PACKAGE_BUGREPORT "" 42 | 43 | /* Define to the full name of this package. */ 44 | #define PACKAGE_NAME "" 45 | 46 | /* Define to the full name and version of this package. */ 47 | #define PACKAGE_STRING "" 48 | 49 | /* Define to the one symbol short name of this package. */ 50 | #define PACKAGE_TARNAME "" 51 | 52 | /* Define to the home page for this package. */ 53 | #define PACKAGE_URL "" 54 | 55 | /* Define to the version of this package. */ 56 | #define PACKAGE_VERSION "" 57 | 58 | /* Define to 1 if you have the ANSI C header files. */ 59 | #define STDC_HEADERS 1 60 | -------------------------------------------------------------------------------- /codes/global/config.h.in: -------------------------------------------------------------------------------- 1 | /* config.h.in. Generated from configure.in by autoheader. */ 2 | 3 | /* Whether to build global as dynamic module */ 4 | #undef COMPILE_DL_GLOBAL 5 | 6 | /* Define to 1 if you have the header file. */ 7 | #undef HAVE_DLFCN_H 8 | 9 | /* Define to 1 if you have the header file. */ 10 | #undef HAVE_INTTYPES_H 11 | 12 | /* Define to 1 if you have the header file. */ 13 | #undef HAVE_MEMORY_H 14 | 15 | /* Define to 1 if you have the header file. */ 16 | #undef HAVE_STDINT_H 17 | 18 | /* Define to 1 if you have the header file. */ 19 | #undef HAVE_STDLIB_H 20 | 21 | /* Define to 1 if you have the header file. */ 22 | #undef HAVE_STRINGS_H 23 | 24 | /* Define to 1 if you have the header file. */ 25 | #undef HAVE_STRING_H 26 | 27 | /* Define to 1 if you have the header file. */ 28 | #undef HAVE_SYS_STAT_H 29 | 30 | /* Define to 1 if you have the header file. */ 31 | #undef HAVE_SYS_TYPES_H 32 | 33 | /* Define to 1 if you have the header file. */ 34 | #undef HAVE_UNISTD_H 35 | 36 | /* Define to 1 if your C compiler doesn't accept -c and -o together. */ 37 | #undef NO_MINUS_C_MINUS_O 38 | 39 | /* Define to the address where bug reports for this package should be sent. */ 40 | #undef PACKAGE_BUGREPORT 41 | 42 | /* Define to the full name of this package. */ 43 | #undef PACKAGE_NAME 44 | 45 | /* Define to the full name and version of this package. */ 46 | #undef PACKAGE_STRING 47 | 48 | /* Define to the one symbol short name of this package. */ 49 | #undef PACKAGE_TARNAME 50 | 51 | /* Define to the home page for this package. */ 52 | #undef PACKAGE_URL 53 | 54 | /* Define to the version of this package. */ 55 | #undef PACKAGE_VERSION 56 | 57 | /* Define to 1 if you have the ANSI C header files. */ 58 | #undef STDC_HEADERS 59 | -------------------------------------------------------------------------------- /codes/global/config.m4: -------------------------------------------------------------------------------- 1 | PHP_ARG_ENABLE(global, whether to enable global support, 2 | [ --enable-global Enable global support]) 3 | 4 | if test "$PHP_GLOBAL" != "no"; then 5 | PHP_NEW_EXTENSION(global, global.c, $ext_shared) 6 | fi 7 | -------------------------------------------------------------------------------- /codes/global/config.nice: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # 3 | # Created by configure 4 | 5 | './configure' \ 6 | '--with-php-config=php-config' \ 7 | "$@" 8 | -------------------------------------------------------------------------------- /codes/global/config.w32: -------------------------------------------------------------------------------- 1 | // $Id$ 2 | // vim:ft=javascript 3 | 4 | // If your extension references something external, use ARG_WITH 5 | // ARG_WITH("global", "for global support", "no"); 6 | 7 | // Otherwise, use ARG_ENABLE 8 | // ARG_ENABLE("global", "enable global support", "no"); 9 | 10 | if (PHP_GLOBAL != "no") { 11 | EXTENSION("global", "global.c"); 12 | } 13 | 14 | -------------------------------------------------------------------------------- /codes/global/global.la: -------------------------------------------------------------------------------- 1 | # global.la - a libtool library file 2 | # Generated by ltmain.sh - GNU libtool 1.5.26 (1.1220.2.492 2008/01/30 06:40:56) 3 | # 4 | # Please DO NOT delete this file! 5 | # It is necessary for linking the library. 6 | 7 | # The name that we can dlopen(3). 8 | dlname='global.so' 9 | 10 | # Names of this library. 11 | library_names='global.so global.so global.so' 12 | 13 | # The name of the static archive. 14 | old_library='' 15 | 16 | # Libraries that this one depends upon. 17 | dependency_libs='' 18 | 19 | # Version information for global. 20 | current=0 21 | age=0 22 | revision=0 23 | 24 | # Is this an already installed library? 25 | installed=no 26 | 27 | # Should we warn about portability when linking against -modules? 28 | shouldnotlink=yes 29 | 30 | # Files to dlopen/dlpreopen 31 | dlopen='' 32 | dlpreopen='' 33 | 34 | # Directory that this library needs to be installed in: 35 | libdir='/Users/kentchen/GitHub/php/php-5.5.20/ext/global/modules' 36 | -------------------------------------------------------------------------------- /codes/global/global.lo: -------------------------------------------------------------------------------- 1 | # global.lo - a libtool object file 2 | # Generated by ltmain.sh - GNU libtool 1.5.26 (1.1220.2.492 2008/01/30 06:40:56) 3 | # 4 | # Please DO NOT delete this file! 5 | # It is necessary for linking the library. 6 | 7 | # Name of the PIC object. 8 | pic_object='.libs/global.o' 9 | 10 | # Name of the non-PIC object. 11 | non_pic_object=none 12 | 13 | -------------------------------------------------------------------------------- /codes/global/global.php: -------------------------------------------------------------------------------- 1 | "; 3 | 4 | if(!extension_loaded('global')) { 5 | dl('global.' . PHP_SHLIB_SUFFIX); 6 | } 7 | 8 | // global_inc(); 9 | // echo global_get()."\n"; 10 | 11 | // global_inc(); 12 | // global_inc(); 13 | // echo global_get()."\n"; 14 | 15 | // echo global_name("leon") . "\n"; 16 | // //echo global_get_name()."\n"; 17 | 18 | // echo global_name("jacky") . "\n"; 19 | // //echo global_get_name()."\n"; 20 | 21 | // print_r(print_server_vars()); 22 | 23 | // $val = print_server_var("GOPATH"); 24 | // if (is_null($val)) { 25 | // echo "not found!!!"; 26 | // }else{ 27 | // echo $val."\n"; 28 | // } 29 | 30 | 31 | //print_r($GLOBALS); 32 | add_globals_vars(); 33 | add_globals_var("_name", "leon"); 34 | print_r($GLOBALS); 35 | 36 | 37 | ?> 38 | -------------------------------------------------------------------------------- /codes/global/install-sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/global/install-sh -------------------------------------------------------------------------------- /codes/global/missing: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/global/missing -------------------------------------------------------------------------------- /codes/global/mkinstalldirs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/global/mkinstalldirs -------------------------------------------------------------------------------- /codes/global/modules/global.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/global/modules/global.so -------------------------------------------------------------------------------- /codes/global/php_global.h: -------------------------------------------------------------------------------- 1 | /* 2 | +----------------------------------------------------------------------+ 3 | | PHP Version 5 | 4 | +----------------------------------------------------------------------+ 5 | | Copyright (c) 1997-2014 The PHP Group | 6 | +----------------------------------------------------------------------+ 7 | | This source file is subject to version 3.01 of the PHP license, | 8 | | that is bundled with this package in the file LICENSE, and is | 9 | | available through the world-wide-web at the following url: | 10 | | http://www.php.net/license/3_01.txt | 11 | | If you did not receive a copy of the PHP license and are unable to | 12 | | obtain it through the world-wide-web, please send a note to | 13 | | license@php.net so we can mail you a copy immediately. | 14 | +----------------------------------------------------------------------+ 15 | | Author: | 16 | +----------------------------------------------------------------------+ 17 | */ 18 | 19 | /* $Id$ */ 20 | 21 | #ifndef PHP_GLOBAL_H 22 | #define PHP_GLOBAL_H 23 | 24 | extern zend_module_entry global_module_entry; 25 | #define phpext_global_ptr &global_module_entry 26 | 27 | #define PHP_GLOBAL_VERSION "0.1.0" /* Replace with version number for your extension */ 28 | 29 | #ifdef PHP_WIN32 30 | # define PHP_GLOBAL_API __declspec(dllexport) 31 | #elif defined(__GNUC__) && __GNUC__ >= 4 32 | # define PHP_GLOBAL_API __attribute__ ((visibility("default"))) 33 | #else 34 | # define PHP_GLOBAL_API 35 | #endif 36 | 37 | #ifdef ZTS 38 | #include "TSRM.h" 39 | #endif 40 | 41 | PHP_MINIT_FUNCTION(global); 42 | PHP_MSHUTDOWN_FUNCTION(global); 43 | PHP_RINIT_FUNCTION(global); 44 | PHP_RSHUTDOWN_FUNCTION(global); 45 | PHP_MINFO_FUNCTION(global); 46 | 47 | 48 | 49 | ZEND_BEGIN_MODULE_GLOBALS(global) 50 | long counter; 51 | char *name; 52 | int name_len; 53 | ZEND_END_MODULE_GLOBALS(global) 54 | 55 | 56 | #ifdef ZTS 57 | #define GLOBAL_G(v) TSRMG(global_globals_id, zend_global_globals *, v) 58 | #else 59 | #define GLOBAL_G(v) (global_globals.v) 60 | #endif 61 | 62 | #endif /* PHP_GLOBAL_H */ 63 | 64 | 65 | /* 66 | * Local variables: 67 | * tab-width: 4 68 | * c-basic-offset: 4 69 | * End: 70 | * vim600: noet sw=4 ts=4 fdm=marker 71 | * vim<600: noet sw=4 ts=4 72 | */ 73 | -------------------------------------------------------------------------------- /codes/global/tests/001.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | Check for global presence 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | 20 | --EXPECT-- 21 | global extension is available 22 | -------------------------------------------------------------------------------- /codes/globalss/.svnignore: -------------------------------------------------------------------------------- 1 | .deps 2 | *.lo 3 | *.la 4 | -------------------------------------------------------------------------------- /codes/globalss/CREDITS: -------------------------------------------------------------------------------- 1 | globalss 2 | -------------------------------------------------------------------------------- /codes/globalss/EXPERIMENTAL: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/globalss/EXPERIMENTAL -------------------------------------------------------------------------------- /codes/globalss/config.m4: -------------------------------------------------------------------------------- 1 | PHP_ARG_WITH(globalss, for globalss support, 2 | [ --with-globalss Include globalss support]) 3 | 4 | PHP_ARG_ENABLE(globalss, whether to enable globalss support, 5 | [ --enable-globalss Enable globalss support]) 6 | 7 | if test "$PHP_GLOBALSS" != "no"; then 8 | PHP_NEW_EXTENSION(globalss, globalss.c, $ext_shared) 9 | fi 10 | -------------------------------------------------------------------------------- /codes/globalss/config.w32: -------------------------------------------------------------------------------- 1 | // $Id$ 2 | // vim:ft=javascript 3 | 4 | // If your extension references something external, use ARG_WITH 5 | // ARG_WITH("globalss", "for globalss support", "no"); 6 | 7 | // Otherwise, use ARG_ENABLE 8 | // ARG_ENABLE("globalss", "enable globalss support", "no"); 9 | 10 | if (PHP_GLOBALSS != "no") { 11 | EXTENSION("globalss", "globalss.c"); 12 | } 13 | 14 | -------------------------------------------------------------------------------- /codes/globalss/globalss.php: -------------------------------------------------------------------------------- 1 | "; 3 | 4 | if(!extension_loaded('globalss')) { 5 | dl('globalss.' . PHP_SHLIB_SUFFIX); 6 | } 7 | 8 | test_sapi_global(); 9 | test_zend_global(); 10 | test_php_global(); 11 | ?> 12 | -------------------------------------------------------------------------------- /codes/globalss/tests/001.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | Check for globalss presence 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | 20 | --EXPECT-- 21 | globalss extension is available 22 | -------------------------------------------------------------------------------- /codes/inis/.deps: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/inis/.deps -------------------------------------------------------------------------------- /codes/inis/.libs/inis.la: -------------------------------------------------------------------------------- 1 | ../inis.la -------------------------------------------------------------------------------- /codes/inis/.libs/inis.lai: -------------------------------------------------------------------------------- 1 | # inis.la - a libtool library file 2 | # Generated by ltmain.sh - GNU libtool 1.5.26 (1.1220.2.492 2008/01/30 06:40:56) 3 | # 4 | # Please DO NOT delete this file! 5 | # It is necessary for linking the library. 6 | 7 | # The name that we can dlopen(3). 8 | dlname='inis.so' 9 | 10 | # Names of this library. 11 | library_names='inis.so inis.so inis.so' 12 | 13 | # The name of the static archive. 14 | old_library='' 15 | 16 | # Libraries that this one depends upon. 17 | dependency_libs='' 18 | 19 | # Version information for inis. 20 | current=0 21 | age=0 22 | revision=0 23 | 24 | # Is this an already installed library? 25 | installed=yes 26 | 27 | # Should we warn about portability when linking against -modules? 28 | shouldnotlink=yes 29 | 30 | # Files to dlopen/dlpreopen 31 | dlopen='' 32 | dlpreopen='' 33 | 34 | # Directory that this library needs to be installed in: 35 | libdir='/Users/kentchen/GitHub/php/php-5.5.20/ext/inis/modules' 36 | -------------------------------------------------------------------------------- /codes/inis/.libs/inis.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/inis/.libs/inis.o -------------------------------------------------------------------------------- /codes/inis/.libs/inis.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/inis/.libs/inis.so -------------------------------------------------------------------------------- /codes/inis/.libs/inis.so.dSYM/Contents/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleIdentifier 8 | com.apple.xcode.dsym.inis.so 9 | CFBundleInfoDictionaryVersion 10 | 6.0 11 | CFBundlePackageType 12 | dSYM 13 | CFBundleSignature 14 | ???? 15 | CFBundleShortVersionString 16 | 1.0 17 | CFBundleVersion 18 | 1 19 | 20 | 21 | -------------------------------------------------------------------------------- /codes/inis/.libs/inis.so.dSYM/Contents/Resources/DWARF/inis.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/inis/.libs/inis.so.dSYM/Contents/Resources/DWARF/inis.so -------------------------------------------------------------------------------- /codes/inis/.svnignore: -------------------------------------------------------------------------------- 1 | .deps 2 | *.lo 3 | *.la 4 | -------------------------------------------------------------------------------- /codes/inis/CREDITS: -------------------------------------------------------------------------------- 1 | inis 2 | -------------------------------------------------------------------------------- /codes/inis/EXPERIMENTAL: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/inis/EXPERIMENTAL -------------------------------------------------------------------------------- /codes/inis/Makefile.fragments: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/inis/Makefile.fragments -------------------------------------------------------------------------------- /codes/inis/Makefile.objects: -------------------------------------------------------------------------------- 1 | inis.lo: /Users/kentchen/GitHub/php/php-5.5.20/ext/inis/inis.c 2 | $(LIBTOOL) --mode=compile $(CC) -I. -I/Users/kentchen/GitHub/php/php-5.5.20/ext/inis $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) -c /Users/kentchen/GitHub/php/php-5.5.20/ext/inis/inis.c -o inis.lo 3 | $(phplibdir)/inis.la: ./inis.la 4 | $(LIBTOOL) --mode=install cp ./inis.la $(phplibdir) 5 | 6 | ./inis.la: $(shared_objects_inis) $(INIS_SHARED_DEPENDENCIES) 7 | $(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_inis) $(INIS_SHARED_LIBADD) 8 | 9 | -------------------------------------------------------------------------------- /codes/inis/build/mkdep.awk: -------------------------------------------------------------------------------- 1 | # +----------------------------------------------------------------------+ 2 | # | PHP Version 5 | 3 | # +----------------------------------------------------------------------+ 4 | # | Copyright (c) 2000-2006 The PHP Group | 5 | # +----------------------------------------------------------------------+ 6 | # | This source file is subject to version 3.01 of the PHP license, | 7 | # | that is bundled with this package in the file LICENSE, and is | 8 | # | available through the world-wide-web at the following url: | 9 | # | http://www.php.net/license/3_01.txt | 10 | # | If you did not receive a copy of the PHP license and are unable to | 11 | # | obtain it through the world-wide-web, please send a note to | 12 | # | license@php.net so we can mail you a copy immediately. | 13 | # +----------------------------------------------------------------------+ 14 | # | Author: Sascha Schumann | 15 | # +----------------------------------------------------------------------+ 16 | # 17 | # $Id$ 18 | # 19 | # Usage: 20 | # 21 | # echo top_srcdir top_builddir srcdir CPP [CPP-ARGS] filenames | \ 22 | # awk -f mkdep.awk > dependencies 23 | 24 | 25 | { 26 | top_srcdir=$1 27 | top_builddir=$2 28 | srcdir=$3 29 | cmd=$4 30 | 31 | for (i = 5; i <= NF; i++) { 32 | if (match($i, "^-[A-Z]") == 0) 33 | break; 34 | cmd=cmd " " $i 35 | } 36 | 37 | dif=i-1 38 | 39 | for (; i <= NF; i++) 40 | filenames[i-dif]=$i 41 | 42 | no_files=NF-dif 43 | 44 | for(i = 1; i <= no_files; i++) { 45 | if (system("test -r " filenames[i]) != 0) 46 | continue 47 | 48 | target=filenames[i] 49 | sub(srcdir "/", "", target) 50 | target2=target 51 | sub("\.(c|cpp)$", ".lo", target); 52 | sub("\.(c|cpp)$", ".slo", target2); 53 | 54 | for (e in used) 55 | delete used[e] 56 | 57 | cmdx=cmd " " filenames[i] 58 | done=0 59 | while ((cmdx | getline) > 0) { 60 | if (match($0, "^# [0-9]* \".*\.h\"") != 0) { 61 | if (sub(top_srcdir, "$(top_srcdir)", $3) == 0) 62 | sub(top_builddir, "$(top_builddir)", $3) 63 | if (substr($3,2,1) != "/" && used[$3] != 1) { 64 | if (done == 0) 65 | printf(target " " target2 ":") 66 | done=1 67 | printf(" \\\n\t" substr($3,2,length($3)-2)) 68 | used[$3] = 1; 69 | } 70 | } 71 | } 72 | if (done == 1) 73 | print "\n" 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /codes/inis/build/scan_makefile_in.awk: -------------------------------------------------------------------------------- 1 | BEGIN { 2 | mode=0 3 | sources="" 4 | } 5 | 6 | mode == 0 && /^LTLIBRARY_SOURCES.*\\$/ { 7 | if (match($0, "[^=]*$")) { 8 | sources=substr($0, RSTART, RLENGTH-1) 9 | } 10 | mode=1 11 | next 12 | } 13 | 14 | mode == 0 && /^LTLIBRARY_SOURCES.*/ { 15 | if (match($0, "[^=]*$")) { 16 | sources=substr($0, RSTART, RLENGTH) 17 | } 18 | } 19 | 20 | mode == 1 && /.*\\$/ { 21 | sources=sources substr($0, 0, length - 1) 22 | next 23 | } 24 | 25 | mode == 1 { 26 | sources=sources $0 27 | mode=0 28 | } 29 | 30 | END { 31 | print sources 32 | } 33 | -------------------------------------------------------------------------------- /codes/inis/build/shtool: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/inis/build/shtool -------------------------------------------------------------------------------- /codes/inis/config.h: -------------------------------------------------------------------------------- 1 | /* config.h. Generated from config.h.in by configure. */ 2 | /* config.h.in. Generated from configure.in by autoheader. */ 3 | 4 | /* Whether to build inis as dynamic module */ 5 | #define COMPILE_DL_INIS 1 6 | 7 | /* Define to 1 if you have the header file. */ 8 | #define HAVE_DLFCN_H 1 9 | 10 | /* Define to 1 if you have the header file. */ 11 | #define HAVE_INTTYPES_H 1 12 | 13 | /* Define to 1 if you have the header file. */ 14 | #define HAVE_MEMORY_H 1 15 | 16 | /* Define to 1 if you have the header file. */ 17 | #define HAVE_STDINT_H 1 18 | 19 | /* Define to 1 if you have the header file. */ 20 | #define HAVE_STDLIB_H 1 21 | 22 | /* Define to 1 if you have the header file. */ 23 | #define HAVE_STRINGS_H 1 24 | 25 | /* Define to 1 if you have the header file. */ 26 | #define HAVE_STRING_H 1 27 | 28 | /* Define to 1 if you have the header file. */ 29 | #define HAVE_SYS_STAT_H 1 30 | 31 | /* Define to 1 if you have the header file. */ 32 | #define HAVE_SYS_TYPES_H 1 33 | 34 | /* Define to 1 if you have the header file. */ 35 | #define HAVE_UNISTD_H 1 36 | 37 | /* Define to 1 if your C compiler doesn't accept -c and -o together. */ 38 | /* #undef NO_MINUS_C_MINUS_O */ 39 | 40 | /* Define to the address where bug reports for this package should be sent. */ 41 | #define PACKAGE_BUGREPORT "" 42 | 43 | /* Define to the full name of this package. */ 44 | #define PACKAGE_NAME "" 45 | 46 | /* Define to the full name and version of this package. */ 47 | #define PACKAGE_STRING "" 48 | 49 | /* Define to the one symbol short name of this package. */ 50 | #define PACKAGE_TARNAME "" 51 | 52 | /* Define to the home page for this package. */ 53 | #define PACKAGE_URL "" 54 | 55 | /* Define to the version of this package. */ 56 | #define PACKAGE_VERSION "" 57 | 58 | /* Define to 1 if you have the ANSI C header files. */ 59 | #define STDC_HEADERS 1 60 | -------------------------------------------------------------------------------- /codes/inis/config.h.in: -------------------------------------------------------------------------------- 1 | /* config.h.in. Generated from configure.in by autoheader. */ 2 | 3 | /* Whether to build inis as dynamic module */ 4 | #undef COMPILE_DL_INIS 5 | 6 | /* Define to 1 if you have the header file. */ 7 | #undef HAVE_DLFCN_H 8 | 9 | /* Define to 1 if you have the header file. */ 10 | #undef HAVE_INTTYPES_H 11 | 12 | /* Define to 1 if you have the header file. */ 13 | #undef HAVE_MEMORY_H 14 | 15 | /* Define to 1 if you have the header file. */ 16 | #undef HAVE_STDINT_H 17 | 18 | /* Define to 1 if you have the header file. */ 19 | #undef HAVE_STDLIB_H 20 | 21 | /* Define to 1 if you have the header file. */ 22 | #undef HAVE_STRINGS_H 23 | 24 | /* Define to 1 if you have the header file. */ 25 | #undef HAVE_STRING_H 26 | 27 | /* Define to 1 if you have the header file. */ 28 | #undef HAVE_SYS_STAT_H 29 | 30 | /* Define to 1 if you have the header file. */ 31 | #undef HAVE_SYS_TYPES_H 32 | 33 | /* Define to 1 if you have the header file. */ 34 | #undef HAVE_UNISTD_H 35 | 36 | /* Define to 1 if your C compiler doesn't accept -c and -o together. */ 37 | #undef NO_MINUS_C_MINUS_O 38 | 39 | /* Define to the address where bug reports for this package should be sent. */ 40 | #undef PACKAGE_BUGREPORT 41 | 42 | /* Define to the full name of this package. */ 43 | #undef PACKAGE_NAME 44 | 45 | /* Define to the full name and version of this package. */ 46 | #undef PACKAGE_STRING 47 | 48 | /* Define to the one symbol short name of this package. */ 49 | #undef PACKAGE_TARNAME 50 | 51 | /* Define to the home page for this package. */ 52 | #undef PACKAGE_URL 53 | 54 | /* Define to the version of this package. */ 55 | #undef PACKAGE_VERSION 56 | 57 | /* Define to 1 if you have the ANSI C header files. */ 58 | #undef STDC_HEADERS 59 | -------------------------------------------------------------------------------- /codes/inis/config.m4: -------------------------------------------------------------------------------- 1 | PHP_ARG_ENABLE(inis, whether to enable inis support, 2 | [ --enable-inis Enable inis support]) 3 | 4 | if test "$PHP_INIS" != "no"; then 5 | PHP_NEW_EXTENSION(inis, inis.c, $ext_shared) 6 | fi 7 | -------------------------------------------------------------------------------- /codes/inis/config.nice: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # 3 | # Created by configure 4 | 5 | './configure' \ 6 | '--with-php-config=php-config' \ 7 | "$@" 8 | -------------------------------------------------------------------------------- /codes/inis/config.w32: -------------------------------------------------------------------------------- 1 | // $Id$ 2 | // vim:ft=javascript 3 | 4 | // If your extension references something external, use ARG_WITH 5 | // ARG_WITH("inis", "for inis support", "no"); 6 | 7 | // Otherwise, use ARG_ENABLE 8 | // ARG_ENABLE("inis", "enable inis support", "no"); 9 | 10 | if (PHP_INIS != "no") { 11 | EXTENSION("inis", "inis.c"); 12 | } 13 | 14 | -------------------------------------------------------------------------------- /codes/inis/inis.la: -------------------------------------------------------------------------------- 1 | # inis.la - a libtool library file 2 | # Generated by ltmain.sh - GNU libtool 1.5.26 (1.1220.2.492 2008/01/30 06:40:56) 3 | # 4 | # Please DO NOT delete this file! 5 | # It is necessary for linking the library. 6 | 7 | # The name that we can dlopen(3). 8 | dlname='inis.so' 9 | 10 | # Names of this library. 11 | library_names='inis.so inis.so inis.so' 12 | 13 | # The name of the static archive. 14 | old_library='' 15 | 16 | # Libraries that this one depends upon. 17 | dependency_libs='' 18 | 19 | # Version information for inis. 20 | current=0 21 | age=0 22 | revision=0 23 | 24 | # Is this an already installed library? 25 | installed=no 26 | 27 | # Should we warn about portability when linking against -modules? 28 | shouldnotlink=yes 29 | 30 | # Files to dlopen/dlpreopen 31 | dlopen='' 32 | dlpreopen='' 33 | 34 | # Directory that this library needs to be installed in: 35 | libdir='/Users/kentchen/GitHub/php/php-5.5.20/ext/inis/modules' 36 | -------------------------------------------------------------------------------- /codes/inis/inis.lo: -------------------------------------------------------------------------------- 1 | # inis.lo - a libtool object file 2 | # Generated by ltmain.sh - GNU libtool 1.5.26 (1.1220.2.492 2008/01/30 06:40:56) 3 | # 4 | # Please DO NOT delete this file! 5 | # It is necessary for linking the library. 6 | 7 | # Name of the PIC object. 8 | pic_object='.libs/inis.o' 9 | 10 | # Name of the non-PIC object. 11 | non_pic_object=none 12 | 13 | -------------------------------------------------------------------------------- /codes/inis/inis.php: -------------------------------------------------------------------------------- 1 | "; 3 | 4 | if(!extension_loaded('inis')) { 5 | dl('inis.' . PHP_SHLIB_SUFFIX); 6 | } 7 | $module = 'inis'; 8 | $functions = get_extension_funcs($module); 9 | echo "Functions available in the test extension:$br\n"; 10 | foreach($functions as $func) { 11 | echo $func."$br\n"; 12 | } 13 | 14 | 15 | $func = "inis_report"; 16 | call_user_func($func); 17 | ?> 18 | -------------------------------------------------------------------------------- /codes/inis/install-sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/inis/install-sh -------------------------------------------------------------------------------- /codes/inis/missing: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/inis/missing -------------------------------------------------------------------------------- /codes/inis/mkinstalldirs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/inis/mkinstalldirs -------------------------------------------------------------------------------- /codes/inis/modules/inis.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/inis/modules/inis.so -------------------------------------------------------------------------------- /codes/inis/php_inis.h: -------------------------------------------------------------------------------- 1 | /* 2 | +----------------------------------------------------------------------+ 3 | | PHP Version 5 | 4 | +----------------------------------------------------------------------+ 5 | | Copyright (c) 1997-2014 The PHP Group | 6 | +----------------------------------------------------------------------+ 7 | | This source file is subject to version 3.01 of the PHP license, | 8 | | that is bundled with this package in the file LICENSE, and is | 9 | | available through the world-wide-web at the following url: | 10 | | http://www.php.net/license/3_01.txt | 11 | | If you did not receive a copy of the PHP license and are unable to | 12 | | obtain it through the world-wide-web, please send a note to | 13 | | license@php.net so we can mail you a copy immediately. | 14 | +----------------------------------------------------------------------+ 15 | | Author: | 16 | +----------------------------------------------------------------------+ 17 | */ 18 | 19 | /* $Id$ */ 20 | 21 | #ifndef PHP_INIS_H 22 | #define PHP_INIS_H 23 | 24 | extern zend_module_entry inis_module_entry; 25 | #define phpext_inis_ptr &inis_module_entry 26 | 27 | #define PHP_INIS_VERSION "0.1.0" /* Replace with version number for your extension */ 28 | 29 | #ifdef PHP_WIN32 30 | # define PHP_INIS_API __declspec(dllexport) 31 | #elif defined(__GNUC__) && __GNUC__ >= 4 32 | # define PHP_INIS_API __attribute__ ((visibility("default"))) 33 | #else 34 | # define PHP_INIS_API 35 | #endif 36 | 37 | #ifdef ZTS 38 | #include "TSRM.h" 39 | #endif 40 | 41 | PHP_MINIT_FUNCTION(inis); 42 | PHP_MSHUTDOWN_FUNCTION(inis); 43 | PHP_RINIT_FUNCTION(inis); 44 | PHP_RSHUTDOWN_FUNCTION(inis); 45 | PHP_MINFO_FUNCTION(inis); 46 | 47 | PHP_FUNCTION(inis_report); /* For testing, remove later. */ 48 | 49 | 50 | ZEND_BEGIN_MODULE_GLOBALS(inis) 51 | char *name; 52 | long level; 53 | ZEND_END_MODULE_GLOBALS(inis) 54 | 55 | 56 | #ifdef ZTS 57 | #define INIS_G(v) TSRMG(inis_globals_id, zend_inis_globals *, v) 58 | #else 59 | #define INIS_G(v) (inis_globals.v) 60 | #endif 61 | 62 | #endif /* PHP_INIS_H */ 63 | 64 | 65 | /* 66 | * Local variables: 67 | * tab-width: 4 68 | * c-basic-offset: 4 69 | * End: 70 | * vim600: noet sw=4 ts=4 fdm=marker 71 | * vim<600: noet sw=4 ts=4 72 | */ 73 | -------------------------------------------------------------------------------- /codes/inis/tests/001.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | Check for inis presence 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | 20 | --EXPECT-- 21 | inis extension is available 22 | -------------------------------------------------------------------------------- /codes/libs/.deps: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/libs/.deps -------------------------------------------------------------------------------- /codes/libs/.libs/libs.la: -------------------------------------------------------------------------------- 1 | ../libs.la -------------------------------------------------------------------------------- /codes/libs/.libs/libs.lai: -------------------------------------------------------------------------------- 1 | # libs.la - a libtool library file 2 | # Generated by ltmain.sh - GNU libtool 1.5.26 (1.1220.2.492 2008/01/30 06:40:56) 3 | # 4 | # Please DO NOT delete this file! 5 | # It is necessary for linking the library. 6 | 7 | # The name that we can dlopen(3). 8 | dlname='libs.so' 9 | 10 | # Names of this library. 11 | library_names='libs.so libs.so libs.so' 12 | 13 | # The name of the static archive. 14 | old_library='' 15 | 16 | # Libraries that this one depends upon. 17 | dependency_libs=' -lcurl' 18 | 19 | # Version information for libs. 20 | current=0 21 | age=0 22 | revision=0 23 | 24 | # Is this an already installed library? 25 | installed=yes 26 | 27 | # Should we warn about portability when linking against -modules? 28 | shouldnotlink=yes 29 | 30 | # Files to dlopen/dlpreopen 31 | dlopen='' 32 | dlpreopen='' 33 | 34 | # Directory that this library needs to be installed in: 35 | libdir='/Users/kentchen/GitHub/php/php-5.5.20/ext/libs/modules' 36 | -------------------------------------------------------------------------------- /codes/libs/.libs/libs.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/libs/.libs/libs.o -------------------------------------------------------------------------------- /codes/libs/.libs/libs.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/libs/.libs/libs.so -------------------------------------------------------------------------------- /codes/libs/.libs/libs.so.dSYM/Contents/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleIdentifier 8 | com.apple.xcode.dsym.libs.so 9 | CFBundleInfoDictionaryVersion 10 | 6.0 11 | CFBundlePackageType 12 | dSYM 13 | CFBundleSignature 14 | ???? 15 | CFBundleShortVersionString 16 | 1.0 17 | CFBundleVersion 18 | 1 19 | 20 | 21 | -------------------------------------------------------------------------------- /codes/libs/.libs/libs.so.dSYM/Contents/Resources/DWARF/libs.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/libs/.libs/libs.so.dSYM/Contents/Resources/DWARF/libs.so -------------------------------------------------------------------------------- /codes/libs/.svnignore: -------------------------------------------------------------------------------- 1 | .deps 2 | *.lo 3 | *.la 4 | -------------------------------------------------------------------------------- /codes/libs/CREDITS: -------------------------------------------------------------------------------- 1 | libs 2 | -------------------------------------------------------------------------------- /codes/libs/EXPERIMENTAL: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/libs/EXPERIMENTAL -------------------------------------------------------------------------------- /codes/libs/Makefile.fragments: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/libs/Makefile.fragments -------------------------------------------------------------------------------- /codes/libs/Makefile.objects: -------------------------------------------------------------------------------- 1 | libs.lo: /Users/kentchen/GitHub/php/php-5.5.20/ext/libs/libs.c 2 | $(LIBTOOL) --mode=compile $(CC) -I. -I/Users/kentchen/GitHub/php/php-5.5.20/ext/libs $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) -c /Users/kentchen/GitHub/php/php-5.5.20/ext/libs/libs.c -o libs.lo 3 | $(phplibdir)/libs.la: ./libs.la 4 | $(LIBTOOL) --mode=install cp ./libs.la $(phplibdir) 5 | 6 | ./libs.la: $(shared_objects_libs) $(LIBS_SHARED_DEPENDENCIES) 7 | $(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_libs) $(LIBS_SHARED_LIBADD) 8 | 9 | -------------------------------------------------------------------------------- /codes/libs/build/mkdep.awk: -------------------------------------------------------------------------------- 1 | # +----------------------------------------------------------------------+ 2 | # | PHP Version 5 | 3 | # +----------------------------------------------------------------------+ 4 | # | Copyright (c) 2000-2006 The PHP Group | 5 | # +----------------------------------------------------------------------+ 6 | # | This source file is subject to version 3.01 of the PHP license, | 7 | # | that is bundled with this package in the file LICENSE, and is | 8 | # | available through the world-wide-web at the following url: | 9 | # | http://www.php.net/license/3_01.txt | 10 | # | If you did not receive a copy of the PHP license and are unable to | 11 | # | obtain it through the world-wide-web, please send a note to | 12 | # | license@php.net so we can mail you a copy immediately. | 13 | # +----------------------------------------------------------------------+ 14 | # | Author: Sascha Schumann | 15 | # +----------------------------------------------------------------------+ 16 | # 17 | # $Id$ 18 | # 19 | # Usage: 20 | # 21 | # echo top_srcdir top_builddir srcdir CPP [CPP-ARGS] filenames | \ 22 | # awk -f mkdep.awk > dependencies 23 | 24 | 25 | { 26 | top_srcdir=$1 27 | top_builddir=$2 28 | srcdir=$3 29 | cmd=$4 30 | 31 | for (i = 5; i <= NF; i++) { 32 | if (match($i, "^-[A-Z]") == 0) 33 | break; 34 | cmd=cmd " " $i 35 | } 36 | 37 | dif=i-1 38 | 39 | for (; i <= NF; i++) 40 | filenames[i-dif]=$i 41 | 42 | no_files=NF-dif 43 | 44 | for(i = 1; i <= no_files; i++) { 45 | if (system("test -r " filenames[i]) != 0) 46 | continue 47 | 48 | target=filenames[i] 49 | sub(srcdir "/", "", target) 50 | target2=target 51 | sub("\.(c|cpp)$", ".lo", target); 52 | sub("\.(c|cpp)$", ".slo", target2); 53 | 54 | for (e in used) 55 | delete used[e] 56 | 57 | cmdx=cmd " " filenames[i] 58 | done=0 59 | while ((cmdx | getline) > 0) { 60 | if (match($0, "^# [0-9]* \".*\.h\"") != 0) { 61 | if (sub(top_srcdir, "$(top_srcdir)", $3) == 0) 62 | sub(top_builddir, "$(top_builddir)", $3) 63 | if (substr($3,2,1) != "/" && used[$3] != 1) { 64 | if (done == 0) 65 | printf(target " " target2 ":") 66 | done=1 67 | printf(" \\\n\t" substr($3,2,length($3)-2)) 68 | used[$3] = 1; 69 | } 70 | } 71 | } 72 | if (done == 1) 73 | print "\n" 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /codes/libs/build/scan_makefile_in.awk: -------------------------------------------------------------------------------- 1 | BEGIN { 2 | mode=0 3 | sources="" 4 | } 5 | 6 | mode == 0 && /^LTLIBRARY_SOURCES.*\\$/ { 7 | if (match($0, "[^=]*$")) { 8 | sources=substr($0, RSTART, RLENGTH-1) 9 | } 10 | mode=1 11 | next 12 | } 13 | 14 | mode == 0 && /^LTLIBRARY_SOURCES.*/ { 15 | if (match($0, "[^=]*$")) { 16 | sources=substr($0, RSTART, RLENGTH) 17 | } 18 | } 19 | 20 | mode == 1 && /.*\\$/ { 21 | sources=sources substr($0, 0, length - 1) 22 | next 23 | } 24 | 25 | mode == 1 { 26 | sources=sources $0 27 | mode=0 28 | } 29 | 30 | END { 31 | print sources 32 | } 33 | -------------------------------------------------------------------------------- /codes/libs/build/shtool: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/libs/build/shtool -------------------------------------------------------------------------------- /codes/libs/config.h: -------------------------------------------------------------------------------- 1 | /* config.h. Generated from config.h.in by configure. */ 2 | /* config.h.in. Generated from configure.in by autoheader. */ 3 | 4 | /* Whether to build libs as dynamic module */ 5 | #define COMPILE_DL_LIBS 1 6 | 7 | /* Define to 1 if you have the header file. */ 8 | #define HAVE_DLFCN_H 1 9 | 10 | /* Define to 1 if you have the header file. */ 11 | #define HAVE_INTTYPES_H 1 12 | 13 | /* */ 14 | #define HAVE_LIBSLIB 1 15 | 16 | /* Define to 1 if you have the header file. */ 17 | #define HAVE_MEMORY_H 1 18 | 19 | /* Define to 1 if you have the header file. */ 20 | #define HAVE_STDINT_H 1 21 | 22 | /* Define to 1 if you have the header file. */ 23 | #define HAVE_STDLIB_H 1 24 | 25 | /* Define to 1 if you have the header file. */ 26 | #define HAVE_STRINGS_H 1 27 | 28 | /* Define to 1 if you have the header file. */ 29 | #define HAVE_STRING_H 1 30 | 31 | /* Define to 1 if you have the header file. */ 32 | #define HAVE_SYS_STAT_H 1 33 | 34 | /* Define to 1 if you have the header file. */ 35 | #define HAVE_SYS_TYPES_H 1 36 | 37 | /* Define to 1 if you have the header file. */ 38 | #define HAVE_UNISTD_H 1 39 | 40 | /* Define to 1 if your C compiler doesn't accept -c and -o together. */ 41 | /* #undef NO_MINUS_C_MINUS_O */ 42 | 43 | /* Define to the address where bug reports for this package should be sent. */ 44 | #define PACKAGE_BUGREPORT "" 45 | 46 | /* Define to the full name of this package. */ 47 | #define PACKAGE_NAME "" 48 | 49 | /* Define to the full name and version of this package. */ 50 | #define PACKAGE_STRING "" 51 | 52 | /* Define to the one symbol short name of this package. */ 53 | #define PACKAGE_TARNAME "" 54 | 55 | /* Define to the home page for this package. */ 56 | #define PACKAGE_URL "" 57 | 58 | /* Define to the version of this package. */ 59 | #define PACKAGE_VERSION "" 60 | 61 | /* Define to 1 if you have the ANSI C header files. */ 62 | #define STDC_HEADERS 1 63 | -------------------------------------------------------------------------------- /codes/libs/config.h.in: -------------------------------------------------------------------------------- 1 | /* config.h.in. Generated from configure.in by autoheader. */ 2 | 3 | /* Whether to build libs as dynamic module */ 4 | #undef COMPILE_DL_LIBS 5 | 6 | /* Define to 1 if you have the header file. */ 7 | #undef HAVE_DLFCN_H 8 | 9 | /* Define to 1 if you have the header file. */ 10 | #undef HAVE_INTTYPES_H 11 | 12 | /* */ 13 | #undef HAVE_LIBSLIB 14 | 15 | /* Define to 1 if you have the header file. */ 16 | #undef HAVE_MEMORY_H 17 | 18 | /* Define to 1 if you have the header file. */ 19 | #undef HAVE_STDINT_H 20 | 21 | /* Define to 1 if you have the header file. */ 22 | #undef HAVE_STDLIB_H 23 | 24 | /* Define to 1 if you have the header file. */ 25 | #undef HAVE_STRINGS_H 26 | 27 | /* Define to 1 if you have the header file. */ 28 | #undef HAVE_STRING_H 29 | 30 | /* Define to 1 if you have the header file. */ 31 | #undef HAVE_SYS_STAT_H 32 | 33 | /* Define to 1 if you have the header file. */ 34 | #undef HAVE_SYS_TYPES_H 35 | 36 | /* Define to 1 if you have the header file. */ 37 | #undef HAVE_UNISTD_H 38 | 39 | /* Define to 1 if your C compiler doesn't accept -c and -o together. */ 40 | #undef NO_MINUS_C_MINUS_O 41 | 42 | /* Define to the address where bug reports for this package should be sent. */ 43 | #undef PACKAGE_BUGREPORT 44 | 45 | /* Define to the full name of this package. */ 46 | #undef PACKAGE_NAME 47 | 48 | /* Define to the full name and version of this package. */ 49 | #undef PACKAGE_STRING 50 | 51 | /* Define to the one symbol short name of this package. */ 52 | #undef PACKAGE_TARNAME 53 | 54 | /* Define to the home page for this package. */ 55 | #undef PACKAGE_URL 56 | 57 | /* Define to the version of this package. */ 58 | #undef PACKAGE_VERSION 59 | 60 | /* Define to 1 if you have the ANSI C header files. */ 61 | #undef STDC_HEADERS 62 | -------------------------------------------------------------------------------- /codes/libs/config.m4: -------------------------------------------------------------------------------- 1 | PHP_ARG_WITH(libs, for libs support, 2 | [ --with-libs Include libs support]) 3 | 4 | PHP_ARG_ENABLE(libs, whether to enable libs support, 5 | [ --enable-libs Enable libs support]) 6 | 7 | if test "$PHP_LIBS" != "no"; then 8 | dnl # --with-libs -> check with-path 9 | SEARCH_PATH="/usr/local /usr" # you might want to change this 10 | SEARCH_FOR="/include/curl/curl.h" # you most likely want to change this 11 | if test -r $PHP_LIBS/$SEARCH_FOR; then # path given as parameter 12 | LIBS_DIR=$PHP_LIBS 13 | else # search default path list 14 | AC_MSG_CHECKING([for libs files in default path]) 15 | for i in $SEARCH_PATH ; do 16 | if test -r $i/$SEARCH_FOR; then 17 | LIBS_DIR=$i 18 | AC_MSG_RESULT(found in $i) 19 | fi 20 | done 21 | fi 22 | 23 | if test -z "$LIBS_DIR"; then 24 | AC_MSG_RESULT([not found]) 25 | AC_MSG_ERROR([Please reinstall the libs distribution]) 26 | fi 27 | 28 | 29 | PHP_ADD_INCLUDE($LIBS_DIR/include) 30 | 31 | LIBNAME=curl 32 | LIBSYMBOL=curl_version 33 | 34 | PHP_CHECK_LIBRARY($LIBNAME,$LIBSYMBOL, 35 | [ 36 | PHP_ADD_LIBRARY_WITH_PATH($LIBNAME, $LIBS_DIR/$PHP_LIBDIR, LIBS_SHARED_LIBADD) 37 | AC_DEFINE(HAVE_LIBSLIB,1,[ ]) 38 | ],[ 39 | AC_MSG_ERROR([wrong libs lib version or lib not found]) 40 | ],[ 41 | -L$LIBS_DIR/$PHP_LIBDIR -lm 42 | ]) 43 | 44 | PHP_SUBST(LIBS_SHARED_LIBADD) 45 | 46 | PHP_NEW_EXTENSION(libs, libs.c, $ext_shared) 47 | fi 48 | -------------------------------------------------------------------------------- /codes/libs/config.nice: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # 3 | # Created by configure 4 | 5 | './configure' \ 6 | '--with-php-config=/opt/php-debug/bin/php-config' \ 7 | "$@" 8 | -------------------------------------------------------------------------------- /codes/libs/config.w32: -------------------------------------------------------------------------------- 1 | // $Id$ 2 | // vim:ft=javascript 3 | 4 | // If your extension references something external, use ARG_WITH 5 | // ARG_WITH("libs", "for libs support", "no"); 6 | 7 | // Otherwise, use ARG_ENABLE 8 | // ARG_ENABLE("libs", "enable libs support", "no"); 9 | 10 | if (PHP_LIBS != "no") { 11 | EXTENSION("libs", "libs.c"); 12 | } 13 | 14 | -------------------------------------------------------------------------------- /codes/libs/install-sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/libs/install-sh -------------------------------------------------------------------------------- /codes/libs/libs.c: -------------------------------------------------------------------------------- 1 | /* 2 | +----------------------------------------------------------------------+ 3 | | PHP Version 5 | 4 | +----------------------------------------------------------------------+ 5 | | Copyright (c) 1997-2014 The PHP Group | 6 | +----------------------------------------------------------------------+ 7 | | This source file is subject to version 3.01 of the PHP license, | 8 | | that is bundled with this package in the file LICENSE, and is | 9 | | available through the world-wide-web at the following url: | 10 | | http://www.php.net/license/3_01.txt | 11 | | If you did not receive a copy of the PHP license and are unable to | 12 | | obtain it through the world-wide-web, please send a note to | 13 | | license@php.net so we can mail you a copy immediately. | 14 | +----------------------------------------------------------------------+ 15 | | Author: | 16 | +----------------------------------------------------------------------+ 17 | */ 18 | 19 | /* $Id$ */ 20 | 21 | #ifdef HAVE_CONFIG_H 22 | #include "config.h" 23 | #endif 24 | 25 | #include "php.h" 26 | #include "php_ini.h" 27 | #include "ext/standard/info.h" 28 | #include "php_libs.h" 29 | #include 30 | 31 | 32 | const zend_function_entry libs_functions[] = { 33 | PHP_FE(libs_curl_version, NULL) 34 | PHP_FE_END 35 | }; 36 | 37 | zend_module_entry libs_module_entry = { 38 | #if ZEND_MODULE_API_NO >= 20010901 39 | STANDARD_MODULE_HEADER, 40 | #endif 41 | "libs", 42 | libs_functions, 43 | NULL, 44 | NULL, 45 | NULL, /* Replace with NULL if there's nothing to do at request start */ 46 | NULL, /* Replace with NULL if there's nothing to do at request end */ 47 | NULL, 48 | #if ZEND_MODULE_API_NO >= 20010901 49 | PHP_LIBS_VERSION, 50 | #endif 51 | STANDARD_MODULE_PROPERTIES 52 | }; 53 | 54 | 55 | #ifdef COMPILE_DL_LIBS 56 | ZEND_GET_MODULE(libs) 57 | #endif 58 | 59 | 60 | PHP_FUNCTION(libs_curl_version) { 61 | RETURN_STRING(curl_version(), 1); 62 | } 63 | 64 | 65 | /* 66 | * Local variables: 67 | * tab-width: 4 68 | * c-basic-offset: 4 69 | * End: 70 | * vim600: noet sw=4 ts=4 fdm=marker 71 | * vim<600: noet sw=4 ts=4 72 | */ 73 | -------------------------------------------------------------------------------- /codes/libs/libs.la: -------------------------------------------------------------------------------- 1 | # libs.la - a libtool library file 2 | # Generated by ltmain.sh - GNU libtool 1.5.26 (1.1220.2.492 2008/01/30 06:40:56) 3 | # 4 | # Please DO NOT delete this file! 5 | # It is necessary for linking the library. 6 | 7 | # The name that we can dlopen(3). 8 | dlname='libs.so' 9 | 10 | # Names of this library. 11 | library_names='libs.so libs.so libs.so' 12 | 13 | # The name of the static archive. 14 | old_library='' 15 | 16 | # Libraries that this one depends upon. 17 | dependency_libs=' -lcurl' 18 | 19 | # Version information for libs. 20 | current=0 21 | age=0 22 | revision=0 23 | 24 | # Is this an already installed library? 25 | installed=no 26 | 27 | # Should we warn about portability when linking against -modules? 28 | shouldnotlink=yes 29 | 30 | # Files to dlopen/dlpreopen 31 | dlopen='' 32 | dlpreopen='' 33 | 34 | # Directory that this library needs to be installed in: 35 | libdir='/Users/kentchen/GitHub/php/php-5.5.20/ext/libs/modules' 36 | -------------------------------------------------------------------------------- /codes/libs/libs.lo: -------------------------------------------------------------------------------- 1 | # libs.lo - a libtool object file 2 | # Generated by ltmain.sh - GNU libtool 1.5.26 (1.1220.2.492 2008/01/30 06:40:56) 3 | # 4 | # Please DO NOT delete this file! 5 | # It is necessary for linking the library. 6 | 7 | # Name of the PIC object. 8 | pic_object='.libs/libs.o' 9 | 10 | # Name of the non-PIC object. 11 | non_pic_object=none 12 | 13 | -------------------------------------------------------------------------------- /codes/libs/libs.php: -------------------------------------------------------------------------------- 1 | "; 3 | 4 | if(!extension_loaded('libs')) { 5 | dl('libs.' . PHP_SHLIB_SUFFIX); 6 | } 7 | 8 | echo libs_curl_version()."\n"; 9 | 10 | ?> 11 | -------------------------------------------------------------------------------- /codes/libs/missing: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/libs/missing -------------------------------------------------------------------------------- /codes/libs/mkinstalldirs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/libs/mkinstalldirs -------------------------------------------------------------------------------- /codes/libs/modules/libs.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/libs/modules/libs.so -------------------------------------------------------------------------------- /codes/libs/php_libs.h: -------------------------------------------------------------------------------- 1 | /* 2 | +----------------------------------------------------------------------+ 3 | | PHP Version 5 | 4 | +----------------------------------------------------------------------+ 5 | | Copyright (c) 1997-2014 The PHP Group | 6 | +----------------------------------------------------------------------+ 7 | | This source file is subject to version 3.01 of the PHP license, | 8 | | that is bundled with this package in the file LICENSE, and is | 9 | | available through the world-wide-web at the following url: | 10 | | http://www.php.net/license/3_01.txt | 11 | | If you did not receive a copy of the PHP license and are unable to | 12 | | obtain it through the world-wide-web, please send a note to | 13 | | license@php.net so we can mail you a copy immediately. | 14 | +----------------------------------------------------------------------+ 15 | | Author: | 16 | +----------------------------------------------------------------------+ 17 | */ 18 | 19 | /* $Id$ */ 20 | 21 | #ifndef PHP_LIBS_H 22 | #define PHP_LIBS_H 23 | 24 | extern zend_module_entry libs_module_entry; 25 | #define phpext_libs_ptr &libs_module_entry 26 | 27 | #define PHP_LIBS_VERSION "0.1.0" /* Replace with version number for your extension */ 28 | 29 | #ifdef PHP_WIN32 30 | # define PHP_LIBS_API __declspec(dllexport) 31 | #elif defined(__GNUC__) && __GNUC__ >= 4 32 | # define PHP_LIBS_API __attribute__ ((visibility("default"))) 33 | #else 34 | # define PHP_LIBS_API 35 | #endif 36 | 37 | #ifdef ZTS 38 | #include "TSRM.h" 39 | #endif 40 | 41 | 42 | PHP_FUNCTION(libs_curl_version); 43 | 44 | #ifdef ZTS 45 | #define LIBS_G(v) TSRMG(libs_globals_id, zend_libs_globals *, v) 46 | #else 47 | #define LIBS_G(v) (libs_globals.v) 48 | #endif 49 | 50 | #endif /* PHP_LIBS_H */ 51 | 52 | 53 | /* 54 | * Local variables: 55 | * tab-width: 4 56 | * c-basic-offset: 4 57 | * End: 58 | * vim600: noet sw=4 ts=4 fdm=marker 59 | * vim<600: noet sw=4 ts=4 60 | */ 61 | -------------------------------------------------------------------------------- /codes/libs/tests/001.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | Check for libs presence 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | 20 | --EXPECT-- 21 | libs extension is available 22 | -------------------------------------------------------------------------------- /codes/objects1/.deps: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/objects1/.deps -------------------------------------------------------------------------------- /codes/objects1/.libs/objects1.la: -------------------------------------------------------------------------------- 1 | ../objects1.la -------------------------------------------------------------------------------- /codes/objects1/.libs/objects1.lai: -------------------------------------------------------------------------------- 1 | # objects1.la - a libtool library file 2 | # Generated by ltmain.sh - GNU libtool 1.5.26 (1.1220.2.492 2008/01/30 06:40:56) 3 | # 4 | # Please DO NOT delete this file! 5 | # It is necessary for linking the library. 6 | 7 | # The name that we can dlopen(3). 8 | dlname='objects1.so' 9 | 10 | # Names of this library. 11 | library_names='objects1.so objects1.so objects1.so' 12 | 13 | # The name of the static archive. 14 | old_library='' 15 | 16 | # Libraries that this one depends upon. 17 | dependency_libs='' 18 | 19 | # Version information for objects1. 20 | current=0 21 | age=0 22 | revision=0 23 | 24 | # Is this an already installed library? 25 | installed=yes 26 | 27 | # Should we warn about portability when linking against -modules? 28 | shouldnotlink=yes 29 | 30 | # Files to dlopen/dlpreopen 31 | dlopen='' 32 | dlpreopen='' 33 | 34 | # Directory that this library needs to be installed in: 35 | libdir='/Users/kentchen/GitHub/php/php-5.5.20/ext/objects1/modules' 36 | -------------------------------------------------------------------------------- /codes/objects1/.libs/objects1.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/objects1/.libs/objects1.o -------------------------------------------------------------------------------- /codes/objects1/.libs/objects1.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/objects1/.libs/objects1.so -------------------------------------------------------------------------------- /codes/objects1/.libs/objects1.so.dSYM/Contents/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleIdentifier 8 | com.apple.xcode.dsym.objects1.so 9 | CFBundleInfoDictionaryVersion 10 | 6.0 11 | CFBundlePackageType 12 | dSYM 13 | CFBundleSignature 14 | ???? 15 | CFBundleShortVersionString 16 | 1.0 17 | CFBundleVersion 18 | 1 19 | 20 | 21 | -------------------------------------------------------------------------------- /codes/objects1/.libs/objects1.so.dSYM/Contents/Resources/DWARF/objects1.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/objects1/.libs/objects1.so.dSYM/Contents/Resources/DWARF/objects1.so -------------------------------------------------------------------------------- /codes/objects1/.svnignore: -------------------------------------------------------------------------------- 1 | .deps 2 | *.lo 3 | *.la 4 | -------------------------------------------------------------------------------- /codes/objects1/CREDITS: -------------------------------------------------------------------------------- 1 | objects1 2 | -------------------------------------------------------------------------------- /codes/objects1/EXPERIMENTAL: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/objects1/EXPERIMENTAL -------------------------------------------------------------------------------- /codes/objects1/Makefile.fragments: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/objects1/Makefile.fragments -------------------------------------------------------------------------------- /codes/objects1/Makefile.objects: -------------------------------------------------------------------------------- 1 | objects1.lo: /Users/kentchen/GitHub/php/php-5.5.20/ext/objects1/objects1.c 2 | $(LIBTOOL) --mode=compile $(CC) -I. -I/Users/kentchen/GitHub/php/php-5.5.20/ext/objects1 $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) -c /Users/kentchen/GitHub/php/php-5.5.20/ext/objects1/objects1.c -o objects1.lo 3 | $(phplibdir)/objects1.la: ./objects1.la 4 | $(LIBTOOL) --mode=install cp ./objects1.la $(phplibdir) 5 | 6 | ./objects1.la: $(shared_objects_objects1) $(OBJECTS1_SHARED_DEPENDENCIES) 7 | $(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_objects1) $(OBJECTS1_SHARED_LIBADD) 8 | 9 | -------------------------------------------------------------------------------- /codes/objects1/build/scan_makefile_in.awk: -------------------------------------------------------------------------------- 1 | BEGIN { 2 | mode=0 3 | sources="" 4 | } 5 | 6 | mode == 0 && /^LTLIBRARY_SOURCES.*\\$/ { 7 | if (match($0, "[^=]*$")) { 8 | sources=substr($0, RSTART, RLENGTH-1) 9 | } 10 | mode=1 11 | next 12 | } 13 | 14 | mode == 0 && /^LTLIBRARY_SOURCES.*/ { 15 | if (match($0, "[^=]*$")) { 16 | sources=substr($0, RSTART, RLENGTH) 17 | } 18 | } 19 | 20 | mode == 1 && /.*\\$/ { 21 | sources=sources substr($0, 0, length - 1) 22 | next 23 | } 24 | 25 | mode == 1 { 26 | sources=sources $0 27 | mode=0 28 | } 29 | 30 | END { 31 | print sources 32 | } 33 | -------------------------------------------------------------------------------- /codes/objects1/build/shtool: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/objects1/build/shtool -------------------------------------------------------------------------------- /codes/objects1/config.h: -------------------------------------------------------------------------------- 1 | /* config.h. Generated from config.h.in by configure. */ 2 | /* config.h.in. Generated from configure.in by autoheader. */ 3 | 4 | /* Whether to build objects1 as dynamic module */ 5 | #define COMPILE_DL_OBJECTS1 1 6 | 7 | /* Define to 1 if you have the header file. */ 8 | #define HAVE_DLFCN_H 1 9 | 10 | /* Define to 1 if you have the header file. */ 11 | #define HAVE_INTTYPES_H 1 12 | 13 | /* Define to 1 if you have the header file. */ 14 | #define HAVE_MEMORY_H 1 15 | 16 | /* Define to 1 if you have the header file. */ 17 | #define HAVE_STDINT_H 1 18 | 19 | /* Define to 1 if you have the header file. */ 20 | #define HAVE_STDLIB_H 1 21 | 22 | /* Define to 1 if you have the header file. */ 23 | #define HAVE_STRINGS_H 1 24 | 25 | /* Define to 1 if you have the header file. */ 26 | #define HAVE_STRING_H 1 27 | 28 | /* Define to 1 if you have the header file. */ 29 | #define HAVE_SYS_STAT_H 1 30 | 31 | /* Define to 1 if you have the header file. */ 32 | #define HAVE_SYS_TYPES_H 1 33 | 34 | /* Define to 1 if you have the header file. */ 35 | #define HAVE_UNISTD_H 1 36 | 37 | /* Define to 1 if your C compiler doesn't accept -c and -o together. */ 38 | /* #undef NO_MINUS_C_MINUS_O */ 39 | 40 | /* Define to the address where bug reports for this package should be sent. */ 41 | #define PACKAGE_BUGREPORT "" 42 | 43 | /* Define to the full name of this package. */ 44 | #define PACKAGE_NAME "" 45 | 46 | /* Define to the full name and version of this package. */ 47 | #define PACKAGE_STRING "" 48 | 49 | /* Define to the one symbol short name of this package. */ 50 | #define PACKAGE_TARNAME "" 51 | 52 | /* Define to the home page for this package. */ 53 | #define PACKAGE_URL "" 54 | 55 | /* Define to the version of this package. */ 56 | #define PACKAGE_VERSION "" 57 | 58 | /* Define to 1 if you have the ANSI C header files. */ 59 | #define STDC_HEADERS 1 60 | -------------------------------------------------------------------------------- /codes/objects1/config.h.in: -------------------------------------------------------------------------------- 1 | /* config.h.in. Generated from configure.in by autoheader. */ 2 | 3 | /* Whether to build objects1 as dynamic module */ 4 | #undef COMPILE_DL_OBJECTS1 5 | 6 | /* Define to 1 if you have the header file. */ 7 | #undef HAVE_DLFCN_H 8 | 9 | /* Define to 1 if you have the header file. */ 10 | #undef HAVE_INTTYPES_H 11 | 12 | /* Define to 1 if you have the header file. */ 13 | #undef HAVE_MEMORY_H 14 | 15 | /* Define to 1 if you have the header file. */ 16 | #undef HAVE_STDINT_H 17 | 18 | /* Define to 1 if you have the header file. */ 19 | #undef HAVE_STDLIB_H 20 | 21 | /* Define to 1 if you have the header file. */ 22 | #undef HAVE_STRINGS_H 23 | 24 | /* Define to 1 if you have the header file. */ 25 | #undef HAVE_STRING_H 26 | 27 | /* Define to 1 if you have the header file. */ 28 | #undef HAVE_SYS_STAT_H 29 | 30 | /* Define to 1 if you have the header file. */ 31 | #undef HAVE_SYS_TYPES_H 32 | 33 | /* Define to 1 if you have the header file. */ 34 | #undef HAVE_UNISTD_H 35 | 36 | /* Define to 1 if your C compiler doesn't accept -c and -o together. */ 37 | #undef NO_MINUS_C_MINUS_O 38 | 39 | /* Define to the address where bug reports for this package should be sent. */ 40 | #undef PACKAGE_BUGREPORT 41 | 42 | /* Define to the full name of this package. */ 43 | #undef PACKAGE_NAME 44 | 45 | /* Define to the full name and version of this package. */ 46 | #undef PACKAGE_STRING 47 | 48 | /* Define to the one symbol short name of this package. */ 49 | #undef PACKAGE_TARNAME 50 | 51 | /* Define to the home page for this package. */ 52 | #undef PACKAGE_URL 53 | 54 | /* Define to the version of this package. */ 55 | #undef PACKAGE_VERSION 56 | 57 | /* Define to 1 if you have the ANSI C header files. */ 58 | #undef STDC_HEADERS 59 | -------------------------------------------------------------------------------- /codes/objects1/config.m4: -------------------------------------------------------------------------------- 1 | dnl $Id$ 2 | dnl config.m4 for extension objects1 3 | 4 | dnl Comments in this file start with the string 'dnl'. 5 | dnl Remove where necessary. This file will not work 6 | dnl without editing. 7 | 8 | dnl If your extension references something external, use with: 9 | 10 | dnl PHP_ARG_WITH(objects1, for objects1 support, 11 | dnl Make sure that the comment is aligned: 12 | dnl [ --with-objects1 Include objects1 support]) 13 | 14 | dnl Otherwise use enable: 15 | 16 | PHP_ARG_ENABLE(objects1, whether to enable objects1 support, 17 | dnl Make sure that the comment is aligned: 18 | [ --enable-objects1 Enable objects1 support]) 19 | 20 | if test "$PHP_OBJECTS1" != "no"; then 21 | dnl Write more examples of tests here... 22 | 23 | dnl # --with-objects1 -> check with-path 24 | dnl SEARCH_PATH="/usr/local /usr" # you might want to change this 25 | dnl SEARCH_FOR="/include/objects1.h" # you most likely want to change this 26 | dnl if test -r $PHP_OBJECTS1/$SEARCH_FOR; then # path given as parameter 27 | dnl OBJECTS1_DIR=$PHP_OBJECTS1 28 | dnl else # search default path list 29 | dnl AC_MSG_CHECKING([for objects1 files in default path]) 30 | dnl for i in $SEARCH_PATH ; do 31 | dnl if test -r $i/$SEARCH_FOR; then 32 | dnl OBJECTS1_DIR=$i 33 | dnl AC_MSG_RESULT(found in $i) 34 | dnl fi 35 | dnl done 36 | dnl fi 37 | dnl 38 | dnl if test -z "$OBJECTS1_DIR"; then 39 | dnl AC_MSG_RESULT([not found]) 40 | dnl AC_MSG_ERROR([Please reinstall the objects1 distribution]) 41 | dnl fi 42 | 43 | dnl # --with-objects1 -> add include path 44 | dnl PHP_ADD_INCLUDE($OBJECTS1_DIR/include) 45 | 46 | dnl # --with-objects1 -> check for lib and symbol presence 47 | dnl LIBNAME=objects1 # you may want to change this 48 | dnl LIBSYMBOL=objects1 # you most likely want to change this 49 | 50 | dnl PHP_CHECK_LIBRARY($LIBNAME,$LIBSYMBOL, 51 | dnl [ 52 | dnl PHP_ADD_LIBRARY_WITH_PATH($LIBNAME, $OBJECTS1_DIR/$PHP_LIBDIR, OBJECTS1_SHARED_LIBADD) 53 | dnl AC_DEFINE(HAVE_OBJECTS1LIB,1,[ ]) 54 | dnl ],[ 55 | dnl AC_MSG_ERROR([wrong objects1 lib version or lib not found]) 56 | dnl ],[ 57 | dnl -L$OBJECTS1_DIR/$PHP_LIBDIR -lm 58 | dnl ]) 59 | dnl 60 | dnl PHP_SUBST(OBJECTS1_SHARED_LIBADD) 61 | 62 | PHP_NEW_EXTENSION(objects1, objects1.c, $ext_shared) 63 | fi 64 | -------------------------------------------------------------------------------- /codes/objects1/config.nice: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # 3 | # Created by configure 4 | 5 | './configure' \ 6 | '--with-php-config=/opt/php-debug/bin/php-config' \ 7 | "$@" 8 | -------------------------------------------------------------------------------- /codes/objects1/config.w32: -------------------------------------------------------------------------------- 1 | // $Id$ 2 | // vim:ft=javascript 3 | 4 | // If your extension references something external, use ARG_WITH 5 | // ARG_WITH("objects1", "for objects1 support", "no"); 6 | 7 | // Otherwise, use ARG_ENABLE 8 | // ARG_ENABLE("objects1", "enable objects1 support", "no"); 9 | 10 | if (PHP_OBJECTS1 != "no") { 11 | EXTENSION("objects1", "objects1.c"); 12 | } 13 | 14 | -------------------------------------------------------------------------------- /codes/objects1/install-sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/objects1/install-sh -------------------------------------------------------------------------------- /codes/objects1/missing: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/objects1/missing -------------------------------------------------------------------------------- /codes/objects1/mkinstalldirs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/objects1/mkinstalldirs -------------------------------------------------------------------------------- /codes/objects1/modules/objects1.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/objects1/modules/objects1.so -------------------------------------------------------------------------------- /codes/objects1/objects1.la: -------------------------------------------------------------------------------- 1 | # objects1.la - a libtool library file 2 | # Generated by ltmain.sh - GNU libtool 1.5.26 (1.1220.2.492 2008/01/30 06:40:56) 3 | # 4 | # Please DO NOT delete this file! 5 | # It is necessary for linking the library. 6 | 7 | # The name that we can dlopen(3). 8 | dlname='objects1.so' 9 | 10 | # Names of this library. 11 | library_names='objects1.so objects1.so objects1.so' 12 | 13 | # The name of the static archive. 14 | old_library='' 15 | 16 | # Libraries that this one depends upon. 17 | dependency_libs='' 18 | 19 | # Version information for objects1. 20 | current=0 21 | age=0 22 | revision=0 23 | 24 | # Is this an already installed library? 25 | installed=no 26 | 27 | # Should we warn about portability when linking against -modules? 28 | shouldnotlink=yes 29 | 30 | # Files to dlopen/dlpreopen 31 | dlopen='' 32 | dlpreopen='' 33 | 34 | # Directory that this library needs to be installed in: 35 | libdir='/Users/kentchen/GitHub/php/php-5.5.20/ext/objects1/modules' 36 | -------------------------------------------------------------------------------- /codes/objects1/objects1.lo: -------------------------------------------------------------------------------- 1 | # objects1.lo - a libtool object file 2 | # Generated by ltmain.sh - GNU libtool 1.5.26 (1.1220.2.492 2008/01/30 06:40:56) 3 | # 4 | # Please DO NOT delete this file! 5 | # It is necessary for linking the library. 6 | 7 | # Name of the PIC object. 8 | pic_object='.libs/objects1.o' 9 | 10 | # Name of the non-PIC object. 11 | non_pic_object=none 12 | 13 | -------------------------------------------------------------------------------- /codes/objects1/objects1.php: -------------------------------------------------------------------------------- 1 | "; 3 | 4 | if(!extension_loaded('objects1')) { 5 | dl('objects1.' . PHP_SHLIB_SUFFIX); 6 | } 7 | 8 | 9 | $h = new Hello("leon", 15); 10 | print_r($h); 11 | 12 | $h->updateProperties(); 13 | print_r($h); 14 | 15 | $h->addProperties(); 16 | print_r($h); 17 | 18 | 19 | echo "h:". $h; 20 | ?> 21 | -------------------------------------------------------------------------------- /codes/objects1/tests/001.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | Check for objects1 presence 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | 20 | --EXPECT-- 21 | objects1 extension is available 22 | -------------------------------------------------------------------------------- /codes/objects2/.svnignore: -------------------------------------------------------------------------------- 1 | .deps 2 | *.lo 3 | *.la 4 | -------------------------------------------------------------------------------- /codes/objects2/CREDITS: -------------------------------------------------------------------------------- 1 | objects2 2 | -------------------------------------------------------------------------------- /codes/objects2/EXPERIMENTAL: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/objects2/EXPERIMENTAL -------------------------------------------------------------------------------- /codes/objects2/config.m4: -------------------------------------------------------------------------------- 1 | PHP_ARG_WITH(objects2, for objects2 support, 2 | [ --enable-objects2 Enable objects2 support]) 3 | 4 | 5 | if test "$PHP_OBJECTS2" != "no"; then 6 | PHP_NEW_EXTENSION(objects2, objects2.c, $ext_shared) 7 | fi 8 | 9 | 10 | if test -z "$PHP_DEBUG"; then 11 | AC_ARG_ENABLE(debug, 12 | [ --enable-debug compile with debugging symbols],[ 13 | PHP_DEBUG=$enableval 14 | ],[ PHP_DEBUG=no 15 | ]) 16 | fi 17 | -------------------------------------------------------------------------------- /codes/objects2/config.w32: -------------------------------------------------------------------------------- 1 | // $Id$ 2 | // vim:ft=javascript 3 | 4 | // If your extension references something external, use ARG_WITH 5 | // ARG_WITH("objects2", "for objects2 support", "no"); 6 | 7 | // Otherwise, use ARG_ENABLE 8 | // ARG_ENABLE("objects2", "enable objects2 support", "no"); 9 | 10 | if (PHP_OBJECTS2 != "no") { 11 | EXTENSION("objects2", "objects2.c"); 12 | } 13 | 14 | -------------------------------------------------------------------------------- /codes/objects2/objects2.php: -------------------------------------------------------------------------------- 1 | "; 3 | 4 | if(!extension_loaded('objects2')) { 5 | dl('objects2.' . PHP_SHLIB_SUFFIX); 6 | } 7 | 8 | $obj = new Hello("leon", 32); 9 | echo $obj->greet(); 10 | 11 | echo $obj->var; 12 | ?> 13 | -------------------------------------------------------------------------------- /codes/objects2/php_objects2.h: -------------------------------------------------------------------------------- 1 | /* 2 | +----------------------------------------------------------------------+ 3 | | PHP Version 5 | 4 | +----------------------------------------------------------------------+ 5 | | Copyright (c) 1997-2014 The PHP Group | 6 | +----------------------------------------------------------------------+ 7 | | This source file is subject to version 3.01 of the PHP license, | 8 | | that is bundled with this package in the file LICENSE, and is | 9 | | available through the world-wide-web at the following url: | 10 | | http://www.php.net/license/3_01.txt | 11 | | If you did not receive a copy of the PHP license and are unable to | 12 | | obtain it through the world-wide-web, please send a note to | 13 | | license@php.net so we can mail you a copy immediately. | 14 | +----------------------------------------------------------------------+ 15 | | Author: | 16 | +----------------------------------------------------------------------+ 17 | */ 18 | 19 | /* $Id$ */ 20 | 21 | #ifndef PHP_OBJECTS2_H 22 | #define PHP_OBJECTS2_H 23 | 24 | extern zend_module_entry objects2_module_entry; 25 | #define phpext_objects2_ptr &objects2_module_entry 26 | 27 | #define PHP_OBJECTS2_VERSION "0.1.0" /* Replace with version number for your extension */ 28 | 29 | #ifdef PHP_WIN32 30 | # define PHP_OBJECTS2_API __declspec(dllexport) 31 | #elif defined(__GNUC__) && __GNUC__ >= 4 32 | # define PHP_OBJECTS2_API __attribute__ ((visibility("default"))) 33 | #else 34 | # define PHP_OBJECTS2_API 35 | #endif 36 | 37 | #ifdef ZTS 38 | #include "TSRM.h" 39 | #endif 40 | 41 | 42 | 43 | #ifdef ZTS 44 | #define OBJECTS2_G(v) TSRMG(objects2_globals_id, zend_objects2_globals *, v) 45 | #else 46 | #define OBJECTS2_G(v) (objects2_globals.v) 47 | #endif 48 | 49 | #endif /* PHP_OBJECTS2_H */ 50 | 51 | 52 | /* 53 | * Local variables: 54 | * tab-width: 4 55 | * c-basic-offset: 4 56 | * End: 57 | * vim600: noet sw=4 ts=4 fdm=marker 58 | * vim<600: noet sw=4 ts=4 59 | */ 60 | -------------------------------------------------------------------------------- /codes/objects2/tests/001.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | Check for objects2 presence 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | 20 | --EXPECT-- 21 | objects2 extension is available 22 | -------------------------------------------------------------------------------- /codes/objects3/.svnignore: -------------------------------------------------------------------------------- 1 | .deps 2 | *.lo 3 | *.la 4 | -------------------------------------------------------------------------------- /codes/objects3/CREDITS: -------------------------------------------------------------------------------- 1 | objects3 2 | -------------------------------------------------------------------------------- /codes/objects3/EXPERIMENTAL: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/objects3/EXPERIMENTAL -------------------------------------------------------------------------------- /codes/objects3/config.m4: -------------------------------------------------------------------------------- 1 | PHP_ARG_WITH(objects3, for objects3 support, 2 | [ --with-objects3 Include objects3 support]) 3 | 4 | PHP_ARG_ENABLE(objects3, whether to enable objects3 support, 5 | [ --enable-objects3 Enable objects3 support]) 6 | 7 | if test "$PHP_OBJECTS3" != "no"; then 8 | PHP_NEW_EXTENSION(objects3, objects3.c, $ext_shared) 9 | fi 10 | -------------------------------------------------------------------------------- /codes/objects3/config.w32: -------------------------------------------------------------------------------- 1 | // $Id$ 2 | // vim:ft=javascript 3 | 4 | // If your extension references something external, use ARG_WITH 5 | // ARG_WITH("objects3", "for objects3 support", "no"); 6 | 7 | // Otherwise, use ARG_ENABLE 8 | // ARG_ENABLE("objects3", "enable objects3 support", "no"); 9 | 10 | if (PHP_OBJECTS3 != "no") { 11 | EXTENSION("objects3", "objects3.c"); 12 | } 13 | 14 | -------------------------------------------------------------------------------- /codes/objects3/objects3.php: -------------------------------------------------------------------------------- 1 | "; 3 | 4 | if(!extension_loaded('objects3')) { 5 | dl('objects3.' . PHP_SHLIB_SUFFIX); 6 | } 7 | 8 | 9 | $obj = new Hello("leon", 32); 10 | //var_dump($obj); 11 | $obj->foo = "bar"; 12 | //var_dump($obj); 13 | echo "foo:" . $obj->foo . "\n"; 14 | echo "class name111:" . get_class($obj) . "\n"; 15 | //echo "obj: "; 16 | //$obj->greet(); 17 | //echo $obj."_abc"; 18 | //echo "obj count:" . count($obj)."\n"; 19 | 20 | 21 | $obj1 = clone $obj; 22 | // echo "obj1: "; 23 | // $obj1->greet(); 24 | 25 | 26 | //var_dump($obj1); 27 | 28 | $obj2 = new Hello("jacky", 30); 29 | 30 | echo "compare:".bool2str($obj == $obj2)."\n"; 31 | 32 | 33 | 34 | 35 | function bool2str($bool){ 36 | if ($bool === false) { 37 | return 'FALSE'; 38 | } else { 39 | return 'TRUE'; 40 | } 41 | } 42 | ?> 43 | -------------------------------------------------------------------------------- /codes/objects3/php_objects3.h: -------------------------------------------------------------------------------- 1 | /* 2 | +----------------------------------------------------------------------+ 3 | | PHP Version 5 | 4 | +----------------------------------------------------------------------+ 5 | | Copyright (c) 1997-2014 The PHP Group | 6 | +----------------------------------------------------------------------+ 7 | | This source file is subject to version 3.01 of the PHP license, | 8 | | that is bundled with this package in the file LICENSE, and is | 9 | | available through the world-wide-web at the following url: | 10 | | http://www.php.net/license/3_01.txt | 11 | | If you did not receive a copy of the PHP license and are unable to | 12 | | obtain it through the world-wide-web, please send a note to | 13 | | license@php.net so we can mail you a copy immediately. | 14 | +----------------------------------------------------------------------+ 15 | | Author: | 16 | +----------------------------------------------------------------------+ 17 | */ 18 | 19 | /* $Id$ */ 20 | 21 | #ifndef PHP_OBJECTS3_H 22 | #define PHP_OBJECTS3_H 23 | 24 | extern zend_module_entry objects3_module_entry; 25 | #define phpext_objects3_ptr &objects3_module_entry 26 | 27 | #define PHP_OBJECTS3_VERSION "0.1.0" /* Replace with version number for your extension */ 28 | 29 | #ifdef PHP_WIN32 30 | # define PHP_OBJECTS3_API __declspec(dllexport) 31 | #elif defined(__GNUC__) && __GNUC__ >= 4 32 | # define PHP_OBJECTS3_API __attribute__ ((visibility("default"))) 33 | #else 34 | # define PHP_OBJECTS3_API 35 | #endif 36 | 37 | #ifdef ZTS 38 | #include "TSRM.h" 39 | #endif 40 | 41 | PHP_MINIT_FUNCTION(objects3); 42 | 43 | 44 | #ifdef ZTS 45 | #define OBJECTS3_G(v) TSRMG(objects3_globals_id, zend_objects3_globals *, v) 46 | #else 47 | #define OBJECTS3_G(v) (objects3_globals.v) 48 | #endif 49 | 50 | #endif /* PHP_OBJECTS3_H */ 51 | 52 | 53 | /* 54 | * Local variables: 55 | * tab-width: 4 56 | * c-basic-offset: 4 57 | * End: 58 | * vim600: noet sw=4 ts=4 fdm=marker 59 | * vim<600: noet sw=4 ts=4 60 | */ 61 | -------------------------------------------------------------------------------- /codes/objects3/tests/001.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | Check for objects3 presence 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | 20 | --EXPECT-- 21 | objects3 extension is available 22 | -------------------------------------------------------------------------------- /codes/params/.deps: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/params/.deps -------------------------------------------------------------------------------- /codes/params/.libs/params.la: -------------------------------------------------------------------------------- 1 | ../params.la -------------------------------------------------------------------------------- /codes/params/.libs/params.lai: -------------------------------------------------------------------------------- 1 | # params.la - a libtool library file 2 | # Generated by ltmain.sh - GNU libtool 1.5.26 (1.1220.2.492 2008/01/30 06:40:56) 3 | # 4 | # Please DO NOT delete this file! 5 | # It is necessary for linking the library. 6 | 7 | # The name that we can dlopen(3). 8 | dlname='params.so' 9 | 10 | # Names of this library. 11 | library_names='params.so params.so params.so' 12 | 13 | # The name of the static archive. 14 | old_library='' 15 | 16 | # Libraries that this one depends upon. 17 | dependency_libs='' 18 | 19 | # Version information for params. 20 | current=0 21 | age=0 22 | revision=0 23 | 24 | # Is this an already installed library? 25 | installed=yes 26 | 27 | # Should we warn about portability when linking against -modules? 28 | shouldnotlink=yes 29 | 30 | # Files to dlopen/dlpreopen 31 | dlopen='' 32 | dlpreopen='' 33 | 34 | # Directory that this library needs to be installed in: 35 | libdir='/Users/kentchen/GitHub/php/php-5.5.20/ext/params/modules' 36 | -------------------------------------------------------------------------------- /codes/params/.libs/params.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/params/.libs/params.o -------------------------------------------------------------------------------- /codes/params/.libs/params.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/params/.libs/params.so -------------------------------------------------------------------------------- /codes/params/.libs/params.so.dSYM/Contents/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleIdentifier 8 | com.apple.xcode.dsym.params.so 9 | CFBundleInfoDictionaryVersion 10 | 6.0 11 | CFBundlePackageType 12 | dSYM 13 | CFBundleSignature 14 | ???? 15 | CFBundleShortVersionString 16 | 1.0 17 | CFBundleVersion 18 | 1 19 | 20 | 21 | -------------------------------------------------------------------------------- /codes/params/.libs/params.so.dSYM/Contents/Resources/DWARF/params.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/params/.libs/params.so.dSYM/Contents/Resources/DWARF/params.so -------------------------------------------------------------------------------- /codes/params/.svnignore: -------------------------------------------------------------------------------- 1 | .deps 2 | *.lo 3 | *.la 4 | -------------------------------------------------------------------------------- /codes/params/CREDITS: -------------------------------------------------------------------------------- 1 | params 2 | -------------------------------------------------------------------------------- /codes/params/EXPERIMENTAL: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/params/EXPERIMENTAL -------------------------------------------------------------------------------- /codes/params/Makefile.fragments: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/params/Makefile.fragments -------------------------------------------------------------------------------- /codes/params/Makefile.objects: -------------------------------------------------------------------------------- 1 | params.lo: /Users/kentchen/GitHub/php/php-5.5.20/ext/params/params.c 2 | $(LIBTOOL) --mode=compile $(CC) -I. -I/Users/kentchen/GitHub/php/php-5.5.20/ext/params $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) -c /Users/kentchen/GitHub/php/php-5.5.20/ext/params/params.c -o params.lo 3 | $(phplibdir)/params.la: ./params.la 4 | $(LIBTOOL) --mode=install cp ./params.la $(phplibdir) 5 | 6 | ./params.la: $(shared_objects_params) $(PARAMS_SHARED_DEPENDENCIES) 7 | $(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_params) $(PARAMS_SHARED_LIBADD) 8 | 9 | -------------------------------------------------------------------------------- /codes/params/build/scan_makefile_in.awk: -------------------------------------------------------------------------------- 1 | BEGIN { 2 | mode=0 3 | sources="" 4 | } 5 | 6 | mode == 0 && /^LTLIBRARY_SOURCES.*\\$/ { 7 | if (match($0, "[^=]*$")) { 8 | sources=substr($0, RSTART, RLENGTH-1) 9 | } 10 | mode=1 11 | next 12 | } 13 | 14 | mode == 0 && /^LTLIBRARY_SOURCES.*/ { 15 | if (match($0, "[^=]*$")) { 16 | sources=substr($0, RSTART, RLENGTH) 17 | } 18 | } 19 | 20 | mode == 1 && /.*\\$/ { 21 | sources=sources substr($0, 0, length - 1) 22 | next 23 | } 24 | 25 | mode == 1 { 26 | sources=sources $0 27 | mode=0 28 | } 29 | 30 | END { 31 | print sources 32 | } 33 | -------------------------------------------------------------------------------- /codes/params/build/shtool: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/params/build/shtool -------------------------------------------------------------------------------- /codes/params/config.h: -------------------------------------------------------------------------------- 1 | /* config.h. Generated from config.h.in by configure. */ 2 | /* config.h.in. Generated from configure.in by autoheader. */ 3 | 4 | /* Whether to build params as dynamic module */ 5 | #define COMPILE_DL_PARAMS 1 6 | 7 | /* Define to 1 if you have the header file. */ 8 | #define HAVE_DLFCN_H 1 9 | 10 | /* Define to 1 if you have the header file. */ 11 | #define HAVE_INTTYPES_H 1 12 | 13 | /* Define to 1 if you have the header file. */ 14 | #define HAVE_MEMORY_H 1 15 | 16 | /* Define to 1 if you have the header file. */ 17 | #define HAVE_STDINT_H 1 18 | 19 | /* Define to 1 if you have the header file. */ 20 | #define HAVE_STDLIB_H 1 21 | 22 | /* Define to 1 if you have the header file. */ 23 | #define HAVE_STRINGS_H 1 24 | 25 | /* Define to 1 if you have the header file. */ 26 | #define HAVE_STRING_H 1 27 | 28 | /* Define to 1 if you have the header file. */ 29 | #define HAVE_SYS_STAT_H 1 30 | 31 | /* Define to 1 if you have the header file. */ 32 | #define HAVE_SYS_TYPES_H 1 33 | 34 | /* Define to 1 if you have the header file. */ 35 | #define HAVE_UNISTD_H 1 36 | 37 | /* Define to 1 if your C compiler doesn't accept -c and -o together. */ 38 | /* #undef NO_MINUS_C_MINUS_O */ 39 | 40 | /* Define to the address where bug reports for this package should be sent. */ 41 | #define PACKAGE_BUGREPORT "" 42 | 43 | /* Define to the full name of this package. */ 44 | #define PACKAGE_NAME "" 45 | 46 | /* Define to the full name and version of this package. */ 47 | #define PACKAGE_STRING "" 48 | 49 | /* Define to the one symbol short name of this package. */ 50 | #define PACKAGE_TARNAME "" 51 | 52 | /* Define to the home page for this package. */ 53 | #define PACKAGE_URL "" 54 | 55 | /* Define to the version of this package. */ 56 | #define PACKAGE_VERSION "" 57 | 58 | /* Define to 1 if you have the ANSI C header files. */ 59 | #define STDC_HEADERS 1 60 | -------------------------------------------------------------------------------- /codes/params/config.h.in: -------------------------------------------------------------------------------- 1 | /* config.h.in. Generated from configure.in by autoheader. */ 2 | 3 | /* Whether to build params as dynamic module */ 4 | #undef COMPILE_DL_PARAMS 5 | 6 | /* Define to 1 if you have the header file. */ 7 | #undef HAVE_DLFCN_H 8 | 9 | /* Define to 1 if you have the header file. */ 10 | #undef HAVE_INTTYPES_H 11 | 12 | /* Define to 1 if you have the header file. */ 13 | #undef HAVE_MEMORY_H 14 | 15 | /* Define to 1 if you have the header file. */ 16 | #undef HAVE_STDINT_H 17 | 18 | /* Define to 1 if you have the header file. */ 19 | #undef HAVE_STDLIB_H 20 | 21 | /* Define to 1 if you have the header file. */ 22 | #undef HAVE_STRINGS_H 23 | 24 | /* Define to 1 if you have the header file. */ 25 | #undef HAVE_STRING_H 26 | 27 | /* Define to 1 if you have the header file. */ 28 | #undef HAVE_SYS_STAT_H 29 | 30 | /* Define to 1 if you have the header file. */ 31 | #undef HAVE_SYS_TYPES_H 32 | 33 | /* Define to 1 if you have the header file. */ 34 | #undef HAVE_UNISTD_H 35 | 36 | /* Define to 1 if your C compiler doesn't accept -c and -o together. */ 37 | #undef NO_MINUS_C_MINUS_O 38 | 39 | /* Define to the address where bug reports for this package should be sent. */ 40 | #undef PACKAGE_BUGREPORT 41 | 42 | /* Define to the full name of this package. */ 43 | #undef PACKAGE_NAME 44 | 45 | /* Define to the full name and version of this package. */ 46 | #undef PACKAGE_STRING 47 | 48 | /* Define to the one symbol short name of this package. */ 49 | #undef PACKAGE_TARNAME 50 | 51 | /* Define to the home page for this package. */ 52 | #undef PACKAGE_URL 53 | 54 | /* Define to the version of this package. */ 55 | #undef PACKAGE_VERSION 56 | 57 | /* Define to 1 if you have the ANSI C header files. */ 58 | #undef STDC_HEADERS 59 | -------------------------------------------------------------------------------- /codes/params/config.m4: -------------------------------------------------------------------------------- 1 | PHP_ARG_ENABLE(params, 2 | whether to enable params support, 3 | [ --enable-params Enable params support]) 4 | 5 | if test "$PHP_PARAMS" != "no"; then 6 | PHP_NEW_EXTENSION(params, params.c, $ext_shared) 7 | fi 8 | -------------------------------------------------------------------------------- /codes/params/config.nice: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # 3 | # Created by configure 4 | 5 | './configure' \ 6 | '--with-php-config=/usr/bin/php-config' \ 7 | "$@" 8 | -------------------------------------------------------------------------------- /codes/params/config.w32: -------------------------------------------------------------------------------- 1 | // $Id$ 2 | // vim:ft=javascript 3 | 4 | // If your extension references something external, use ARG_WITH 5 | // ARG_WITH("params", "for params support", "no"); 6 | 7 | // Otherwise, use ARG_ENABLE 8 | // ARG_ENABLE("params", "enable params support", "no"); 9 | 10 | if (PHP_PARAMS != "no") { 11 | EXTENSION("params", "params.c"); 12 | } 13 | 14 | -------------------------------------------------------------------------------- /codes/params/install-sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/params/install-sh -------------------------------------------------------------------------------- /codes/params/missing: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/params/missing -------------------------------------------------------------------------------- /codes/params/mkinstalldirs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/params/mkinstalldirs -------------------------------------------------------------------------------- /codes/params/modules/params.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/params/modules/params.so -------------------------------------------------------------------------------- /codes/params/params.la: -------------------------------------------------------------------------------- 1 | # params.la - a libtool library file 2 | # Generated by ltmain.sh - GNU libtool 1.5.26 (1.1220.2.492 2008/01/30 06:40:56) 3 | # 4 | # Please DO NOT delete this file! 5 | # It is necessary for linking the library. 6 | 7 | # The name that we can dlopen(3). 8 | dlname='params.so' 9 | 10 | # Names of this library. 11 | library_names='params.so params.so params.so' 12 | 13 | # The name of the static archive. 14 | old_library='' 15 | 16 | # Libraries that this one depends upon. 17 | dependency_libs='' 18 | 19 | # Version information for params. 20 | current=0 21 | age=0 22 | revision=0 23 | 24 | # Is this an already installed library? 25 | installed=no 26 | 27 | # Should we warn about portability when linking against -modules? 28 | shouldnotlink=yes 29 | 30 | # Files to dlopen/dlpreopen 31 | dlopen='' 32 | dlpreopen='' 33 | 34 | # Directory that this library needs to be installed in: 35 | libdir='/Users/kentchen/GitHub/php/php-5.5.20/ext/params/modules' 36 | -------------------------------------------------------------------------------- /codes/params/params.lo: -------------------------------------------------------------------------------- 1 | # params.lo - a libtool object file 2 | # Generated by ltmain.sh - GNU libtool 1.5.26 (1.1220.2.492 2008/01/30 06:40:56) 3 | # 4 | # Please DO NOT delete this file! 5 | # It is necessary for linking the library. 6 | 7 | # Name of the PIC object. 8 | pic_object='.libs/params.o' 9 | 10 | # Name of the non-PIC object. 11 | non_pic_object=none 12 | 13 | -------------------------------------------------------------------------------- /codes/params/params.php: -------------------------------------------------------------------------------- 1 | "; 3 | 4 | if(!extension_loaded('params')) { 5 | dl('params.' . PHP_SHLIB_SUFFIX); 6 | } 7 | $module = 'params'; 8 | $functions = get_extension_funcs($module); 9 | echo "Functions available in the test extension:$br\n"; 10 | 11 | // $func = "params_add"; 12 | // echo "result:".call_user_func($func, 8, 5)."\n"; 13 | 14 | // $func = "params_dump"; 15 | // call_user_func($func, 10)."\n"; 16 | // call_user_func($func, "hello")."\n"; 17 | // call_user_func($func, false)."\n"; 18 | // call_user_func($func, 3.50)."\n"; 19 | // call_user_func($func, array("a" => "a"))."\n"; 20 | 21 | // $foo = new stdClass(); 22 | // $foo->name = "leon"; 23 | // call_user_func($func, $foo)."\n"; 24 | 25 | // $fp = fopen("params.c", "r"); 26 | // call_user_func($func, $fp)."\n"; 27 | // fclose($fp); 28 | 29 | 30 | // $func = "params_array"; 31 | // call_user_func($func, array("a" => "1", "b" => "2", "c" => "3")); 32 | 33 | 34 | $func = "params_str"; 35 | call_user_func($func, "hello world", 10); 36 | call_user_func($func); 37 | 38 | ?> 39 | -------------------------------------------------------------------------------- /codes/params/tests/001.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | Check for params presence 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | 20 | --EXPECT-- 21 | params extension is available 22 | -------------------------------------------------------------------------------- /codes/php_hello/.deps: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/php_hello/.deps -------------------------------------------------------------------------------- /codes/php_hello/.libs/php_hello.la: -------------------------------------------------------------------------------- 1 | ../php_hello.la -------------------------------------------------------------------------------- /codes/php_hello/.libs/php_hello.lai: -------------------------------------------------------------------------------- 1 | # php_hello.la - a libtool library file 2 | # Generated by ltmain.sh - GNU libtool 1.5.26 (1.1220.2.492 2008/01/30 06:40:56) 3 | # 4 | # Please DO NOT delete this file! 5 | # It is necessary for linking the library. 6 | 7 | # The name that we can dlopen(3). 8 | dlname='php_hello.so' 9 | 10 | # Names of this library. 11 | library_names='php_hello.so php_hello.so php_hello.so' 12 | 13 | # The name of the static archive. 14 | old_library='' 15 | 16 | # Libraries that this one depends upon. 17 | dependency_libs='' 18 | 19 | # Version information for php_hello. 20 | current=0 21 | age=0 22 | revision=0 23 | 24 | # Is this an already installed library? 25 | installed=yes 26 | 27 | # Should we warn about portability when linking against -modules? 28 | shouldnotlink=yes 29 | 30 | # Files to dlopen/dlpreopen 31 | dlopen='' 32 | dlpreopen='' 33 | 34 | # Directory that this library needs to be installed in: 35 | libdir='/Users/kentchen/GitHub/php/php-5.5.20/ext/php_hello/modules' 36 | -------------------------------------------------------------------------------- /codes/php_hello/.libs/php_hello.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/php_hello/.libs/php_hello.o -------------------------------------------------------------------------------- /codes/php_hello/.libs/php_hello.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/php_hello/.libs/php_hello.so -------------------------------------------------------------------------------- /codes/php_hello/.libs/php_hello.so.dSYM/Contents/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleIdentifier 8 | com.apple.xcode.dsym.php_hello.so 9 | CFBundleInfoDictionaryVersion 10 | 6.0 11 | CFBundlePackageType 12 | dSYM 13 | CFBundleSignature 14 | ???? 15 | CFBundleShortVersionString 16 | 1.0 17 | CFBundleVersion 18 | 1 19 | 20 | 21 | -------------------------------------------------------------------------------- /codes/php_hello/.libs/php_hello.so.dSYM/Contents/Resources/DWARF/php_hello.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/php_hello/.libs/php_hello.so.dSYM/Contents/Resources/DWARF/php_hello.so -------------------------------------------------------------------------------- /codes/php_hello/.svnignore: -------------------------------------------------------------------------------- 1 | .deps 2 | *.lo 3 | *.la 4 | -------------------------------------------------------------------------------- /codes/php_hello/CREDITS: -------------------------------------------------------------------------------- 1 | php_hello 2 | -------------------------------------------------------------------------------- /codes/php_hello/EXPERIMENTAL: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/php_hello/EXPERIMENTAL -------------------------------------------------------------------------------- /codes/php_hello/Makefile.fragments: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/php_hello/Makefile.fragments -------------------------------------------------------------------------------- /codes/php_hello/Makefile.objects: -------------------------------------------------------------------------------- 1 | php_hello.lo: /Users/kentchen/GitHub/php/php-5.5.20/ext/php_hello/php_hello.c 2 | $(LIBTOOL) --mode=compile $(CC) -I. -I/Users/kentchen/GitHub/php/php-5.5.20/ext/php_hello $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) -c /Users/kentchen/GitHub/php/php-5.5.20/ext/php_hello/php_hello.c -o php_hello.lo 3 | $(phplibdir)/php_hello.la: ./php_hello.la 4 | $(LIBTOOL) --mode=install cp ./php_hello.la $(phplibdir) 5 | 6 | ./php_hello.la: $(shared_objects_php_hello) $(PHP_HELLO_SHARED_DEPENDENCIES) 7 | $(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_php_hello) $(PHP_HELLO_SHARED_LIBADD) 8 | 9 | -------------------------------------------------------------------------------- /codes/php_hello/build/scan_makefile_in.awk: -------------------------------------------------------------------------------- 1 | BEGIN { 2 | mode=0 3 | sources="" 4 | } 5 | 6 | mode == 0 && /^LTLIBRARY_SOURCES.*\\$/ { 7 | if (match($0, "[^=]*$")) { 8 | sources=substr($0, RSTART, RLENGTH-1) 9 | } 10 | mode=1 11 | next 12 | } 13 | 14 | mode == 0 && /^LTLIBRARY_SOURCES.*/ { 15 | if (match($0, "[^=]*$")) { 16 | sources=substr($0, RSTART, RLENGTH) 17 | } 18 | } 19 | 20 | mode == 1 && /.*\\$/ { 21 | sources=sources substr($0, 0, length - 1) 22 | next 23 | } 24 | 25 | mode == 1 { 26 | sources=sources $0 27 | mode=0 28 | } 29 | 30 | END { 31 | print sources 32 | } 33 | -------------------------------------------------------------------------------- /codes/php_hello/build/shtool: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/php_hello/build/shtool -------------------------------------------------------------------------------- /codes/php_hello/config.h: -------------------------------------------------------------------------------- 1 | /* config.h. Generated from config.h.in by configure. */ 2 | /* config.h.in. Generated from configure.in by autoheader. */ 3 | 4 | /* Whether to build php_hello as dynamic module */ 5 | #define COMPILE_DL_PHP_HELLO 1 6 | 7 | /* Define to 1 if you have the header file. */ 8 | #define HAVE_DLFCN_H 1 9 | 10 | /* Define to 1 if you have the header file. */ 11 | #define HAVE_INTTYPES_H 1 12 | 13 | /* Define to 1 if you have the header file. */ 14 | #define HAVE_MEMORY_H 1 15 | 16 | /* Define to 1 if you have the header file. */ 17 | #define HAVE_STDINT_H 1 18 | 19 | /* Define to 1 if you have the header file. */ 20 | #define HAVE_STDLIB_H 1 21 | 22 | /* Define to 1 if you have the header file. */ 23 | #define HAVE_STRINGS_H 1 24 | 25 | /* Define to 1 if you have the header file. */ 26 | #define HAVE_STRING_H 1 27 | 28 | /* Define to 1 if you have the header file. */ 29 | #define HAVE_SYS_STAT_H 1 30 | 31 | /* Define to 1 if you have the header file. */ 32 | #define HAVE_SYS_TYPES_H 1 33 | 34 | /* Define to 1 if you have the header file. */ 35 | #define HAVE_UNISTD_H 1 36 | 37 | /* Define to 1 if your C compiler doesn't accept -c and -o together. */ 38 | /* #undef NO_MINUS_C_MINUS_O */ 39 | 40 | /* Define to the address where bug reports for this package should be sent. */ 41 | #define PACKAGE_BUGREPORT "" 42 | 43 | /* Define to the full name of this package. */ 44 | #define PACKAGE_NAME "" 45 | 46 | /* Define to the full name and version of this package. */ 47 | #define PACKAGE_STRING "" 48 | 49 | /* Define to the one symbol short name of this package. */ 50 | #define PACKAGE_TARNAME "" 51 | 52 | /* Define to the home page for this package. */ 53 | #define PACKAGE_URL "" 54 | 55 | /* Define to the version of this package. */ 56 | #define PACKAGE_VERSION "" 57 | 58 | /* Define to 1 if you have the ANSI C header files. */ 59 | #define STDC_HEADERS 1 60 | -------------------------------------------------------------------------------- /codes/php_hello/config.h.in: -------------------------------------------------------------------------------- 1 | /* config.h.in. Generated from configure.in by autoheader. */ 2 | 3 | /* Whether to build php_hello as dynamic module */ 4 | #undef COMPILE_DL_PHP_HELLO 5 | 6 | /* Define to 1 if you have the header file. */ 7 | #undef HAVE_DLFCN_H 8 | 9 | /* Define to 1 if you have the header file. */ 10 | #undef HAVE_INTTYPES_H 11 | 12 | /* Define to 1 if you have the header file. */ 13 | #undef HAVE_MEMORY_H 14 | 15 | /* Define to 1 if you have the header file. */ 16 | #undef HAVE_STDINT_H 17 | 18 | /* Define to 1 if you have the header file. */ 19 | #undef HAVE_STDLIB_H 20 | 21 | /* Define to 1 if you have the header file. */ 22 | #undef HAVE_STRINGS_H 23 | 24 | /* Define to 1 if you have the header file. */ 25 | #undef HAVE_STRING_H 26 | 27 | /* Define to 1 if you have the header file. */ 28 | #undef HAVE_SYS_STAT_H 29 | 30 | /* Define to 1 if you have the header file. */ 31 | #undef HAVE_SYS_TYPES_H 32 | 33 | /* Define to 1 if you have the header file. */ 34 | #undef HAVE_UNISTD_H 35 | 36 | /* Define to 1 if your C compiler doesn't accept -c and -o together. */ 37 | #undef NO_MINUS_C_MINUS_O 38 | 39 | /* Define to the address where bug reports for this package should be sent. */ 40 | #undef PACKAGE_BUGREPORT 41 | 42 | /* Define to the full name of this package. */ 43 | #undef PACKAGE_NAME 44 | 45 | /* Define to the full name and version of this package. */ 46 | #undef PACKAGE_STRING 47 | 48 | /* Define to the one symbol short name of this package. */ 49 | #undef PACKAGE_TARNAME 50 | 51 | /* Define to the home page for this package. */ 52 | #undef PACKAGE_URL 53 | 54 | /* Define to the version of this package. */ 55 | #undef PACKAGE_VERSION 56 | 57 | /* Define to 1 if you have the ANSI C header files. */ 58 | #undef STDC_HEADERS 59 | -------------------------------------------------------------------------------- /codes/php_hello/config.m4: -------------------------------------------------------------------------------- 1 | PHP_ARG_ENABLE(php_hello, whether to enable php_hello support, 2 | Make sure that the comment is aligned: 3 | [ --enable-php_hello Enable php_hello support]) 4 | 5 | if test "$PHP_PHP_HELLO" != "no"; then 6 | PHP_NEW_EXTENSION(php_hello, php_hello.c, $ext_shared) 7 | fi 8 | -------------------------------------------------------------------------------- /codes/php_hello/config.nice: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # 3 | # Created by configure 4 | 5 | './configure' \ 6 | '--with-php-config=/usr/bin/php-config' \ 7 | "$@" 8 | -------------------------------------------------------------------------------- /codes/php_hello/config.w32: -------------------------------------------------------------------------------- 1 | // $Id$ 2 | // vim:ft=javascript 3 | 4 | // If your extension references something external, use ARG_WITH 5 | // ARG_WITH("php_hello", "for php_hello support", "no"); 6 | 7 | // Otherwise, use ARG_ENABLE 8 | // ARG_ENABLE("php_hello", "enable php_hello support", "no"); 9 | 10 | if (PHP_PHP_HELLO != "no") { 11 | EXTENSION("php_hello", "php_hello.c"); 12 | } 13 | 14 | -------------------------------------------------------------------------------- /codes/php_hello/install-sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/php_hello/install-sh -------------------------------------------------------------------------------- /codes/php_hello/missing: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/php_hello/missing -------------------------------------------------------------------------------- /codes/php_hello/mkinstalldirs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/php_hello/mkinstalldirs -------------------------------------------------------------------------------- /codes/php_hello/modules/php_hello.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/php_hello/modules/php_hello.so -------------------------------------------------------------------------------- /codes/php_hello/php_hello.la: -------------------------------------------------------------------------------- 1 | # php_hello.la - a libtool library file 2 | # Generated by ltmain.sh - GNU libtool 1.5.26 (1.1220.2.492 2008/01/30 06:40:56) 3 | # 4 | # Please DO NOT delete this file! 5 | # It is necessary for linking the library. 6 | 7 | # The name that we can dlopen(3). 8 | dlname='php_hello.so' 9 | 10 | # Names of this library. 11 | library_names='php_hello.so php_hello.so php_hello.so' 12 | 13 | # The name of the static archive. 14 | old_library='' 15 | 16 | # Libraries that this one depends upon. 17 | dependency_libs='' 18 | 19 | # Version information for php_hello. 20 | current=0 21 | age=0 22 | revision=0 23 | 24 | # Is this an already installed library? 25 | installed=no 26 | 27 | # Should we warn about portability when linking against -modules? 28 | shouldnotlink=yes 29 | 30 | # Files to dlopen/dlpreopen 31 | dlopen='' 32 | dlpreopen='' 33 | 34 | # Directory that this library needs to be installed in: 35 | libdir='/Users/kentchen/GitHub/php/php-5.5.20/ext/php_hello/modules' 36 | -------------------------------------------------------------------------------- /codes/php_hello/php_hello.lo: -------------------------------------------------------------------------------- 1 | # php_hello.lo - a libtool object file 2 | # Generated by ltmain.sh - GNU libtool 1.5.26 (1.1220.2.492 2008/01/30 06:40:56) 3 | # 4 | # Please DO NOT delete this file! 5 | # It is necessary for linking the library. 6 | 7 | # Name of the PIC object. 8 | pic_object='.libs/php_hello.o' 9 | 10 | # Name of the non-PIC object. 11 | non_pic_object=none 12 | 13 | -------------------------------------------------------------------------------- /codes/php_hello/php_hello.php: -------------------------------------------------------------------------------- 1 | "; 3 | 4 | if(!extension_loaded('php_hello')) { 5 | dl('php_hello.' . PHP_SHLIB_SUFFIX); 6 | } 7 | $module = 'php_hello'; 8 | $functions = get_extension_funcs($module); 9 | echo "Functions available in the test extension:$br\n"; 10 | foreach($functions as $func) { 11 | echo $func."$br\n"; 12 | } 13 | echo "$br\n"; 14 | $function = 'confirm_' . $module . '_compiled'; 15 | if (extension_loaded($module)) { 16 | $str = $function($module); 17 | } else { 18 | $str = "Module $module is not compiled into PHP"; 19 | } 20 | echo "$str\n"; 21 | ?> 22 | -------------------------------------------------------------------------------- /codes/php_hello/tests/001.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | Check for php_hello presence 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | 20 | --EXPECT-- 21 | php_hello extension is available 22 | -------------------------------------------------------------------------------- /codes/resource/.deps: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/resource/.deps -------------------------------------------------------------------------------- /codes/resource/.libs/resource.la: -------------------------------------------------------------------------------- 1 | ../resource.la -------------------------------------------------------------------------------- /codes/resource/.libs/resource.lai: -------------------------------------------------------------------------------- 1 | # resource.la - a libtool library file 2 | # Generated by ltmain.sh - GNU libtool 1.5.26 (1.1220.2.492 2008/01/30 06:40:56) 3 | # 4 | # Please DO NOT delete this file! 5 | # It is necessary for linking the library. 6 | 7 | # The name that we can dlopen(3). 8 | dlname='resource.so' 9 | 10 | # Names of this library. 11 | library_names='resource.so resource.so resource.so' 12 | 13 | # The name of the static archive. 14 | old_library='' 15 | 16 | # Libraries that this one depends upon. 17 | dependency_libs='' 18 | 19 | # Version information for resource. 20 | current=0 21 | age=0 22 | revision=0 23 | 24 | # Is this an already installed library? 25 | installed=yes 26 | 27 | # Should we warn about portability when linking against -modules? 28 | shouldnotlink=yes 29 | 30 | # Files to dlopen/dlpreopen 31 | dlopen='' 32 | dlpreopen='' 33 | 34 | # Directory that this library needs to be installed in: 35 | libdir='/Users/kentchen/GitHub/php/php-5.5.20/ext/resource/modules' 36 | -------------------------------------------------------------------------------- /codes/resource/.libs/resource.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/resource/.libs/resource.o -------------------------------------------------------------------------------- /codes/resource/.libs/resource.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/resource/.libs/resource.so -------------------------------------------------------------------------------- /codes/resource/.libs/resource.so.dSYM/Contents/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleIdentifier 8 | com.apple.xcode.dsym.resource.so 9 | CFBundleInfoDictionaryVersion 10 | 6.0 11 | CFBundlePackageType 12 | dSYM 13 | CFBundleSignature 14 | ???? 15 | CFBundleShortVersionString 16 | 1.0 17 | CFBundleVersion 18 | 1 19 | 20 | 21 | -------------------------------------------------------------------------------- /codes/resource/.libs/resource.so.dSYM/Contents/Resources/DWARF/resource.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/resource/.libs/resource.so.dSYM/Contents/Resources/DWARF/resource.so -------------------------------------------------------------------------------- /codes/resource/.svnignore: -------------------------------------------------------------------------------- 1 | .deps 2 | *.lo 3 | *.la 4 | -------------------------------------------------------------------------------- /codes/resource/CREDITS: -------------------------------------------------------------------------------- 1 | resource 2 | -------------------------------------------------------------------------------- /codes/resource/EXPERIMENTAL: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/resource/EXPERIMENTAL -------------------------------------------------------------------------------- /codes/resource/Makefile.fragments: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/resource/Makefile.fragments -------------------------------------------------------------------------------- /codes/resource/Makefile.objects: -------------------------------------------------------------------------------- 1 | resource.lo: /Users/kentchen/GitHub/php/php-5.5.20/ext/resource/resource.c 2 | $(LIBTOOL) --mode=compile $(CC) -I. -I/Users/kentchen/GitHub/php/php-5.5.20/ext/resource $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) -c /Users/kentchen/GitHub/php/php-5.5.20/ext/resource/resource.c -o resource.lo 3 | $(phplibdir)/resource.la: ./resource.la 4 | $(LIBTOOL) --mode=install cp ./resource.la $(phplibdir) 5 | 6 | ./resource.la: $(shared_objects_resource) $(RESOURCE_SHARED_DEPENDENCIES) 7 | $(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_resource) $(RESOURCE_SHARED_LIBADD) 8 | 9 | -------------------------------------------------------------------------------- /codes/resource/build/scan_makefile_in.awk: -------------------------------------------------------------------------------- 1 | BEGIN { 2 | mode=0 3 | sources="" 4 | } 5 | 6 | mode == 0 && /^LTLIBRARY_SOURCES.*\\$/ { 7 | if (match($0, "[^=]*$")) { 8 | sources=substr($0, RSTART, RLENGTH-1) 9 | } 10 | mode=1 11 | next 12 | } 13 | 14 | mode == 0 && /^LTLIBRARY_SOURCES.*/ { 15 | if (match($0, "[^=]*$")) { 16 | sources=substr($0, RSTART, RLENGTH) 17 | } 18 | } 19 | 20 | mode == 1 && /.*\\$/ { 21 | sources=sources substr($0, 0, length - 1) 22 | next 23 | } 24 | 25 | mode == 1 { 26 | sources=sources $0 27 | mode=0 28 | } 29 | 30 | END { 31 | print sources 32 | } 33 | -------------------------------------------------------------------------------- /codes/resource/build/shtool: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/resource/build/shtool -------------------------------------------------------------------------------- /codes/resource/config.h: -------------------------------------------------------------------------------- 1 | /* config.h. Generated from config.h.in by configure. */ 2 | /* config.h.in. Generated from configure.in by autoheader. */ 3 | 4 | /* Whether to build resource as dynamic module */ 5 | #define COMPILE_DL_RESOURCE 1 6 | 7 | /* Define to 1 if you have the header file. */ 8 | #define HAVE_DLFCN_H 1 9 | 10 | /* Define to 1 if you have the header file. */ 11 | #define HAVE_INTTYPES_H 1 12 | 13 | /* Define to 1 if you have the header file. */ 14 | #define HAVE_MEMORY_H 1 15 | 16 | /* Define to 1 if you have the header file. */ 17 | #define HAVE_STDINT_H 1 18 | 19 | /* Define to 1 if you have the header file. */ 20 | #define HAVE_STDLIB_H 1 21 | 22 | /* Define to 1 if you have the header file. */ 23 | #define HAVE_STRINGS_H 1 24 | 25 | /* Define to 1 if you have the header file. */ 26 | #define HAVE_STRING_H 1 27 | 28 | /* Define to 1 if you have the header file. */ 29 | #define HAVE_SYS_STAT_H 1 30 | 31 | /* Define to 1 if you have the header file. */ 32 | #define HAVE_SYS_TYPES_H 1 33 | 34 | /* Define to 1 if you have the header file. */ 35 | #define HAVE_UNISTD_H 1 36 | 37 | /* Define to 1 if your C compiler doesn't accept -c and -o together. */ 38 | /* #undef NO_MINUS_C_MINUS_O */ 39 | 40 | /* Define to the address where bug reports for this package should be sent. */ 41 | #define PACKAGE_BUGREPORT "" 42 | 43 | /* Define to the full name of this package. */ 44 | #define PACKAGE_NAME "" 45 | 46 | /* Define to the full name and version of this package. */ 47 | #define PACKAGE_STRING "" 48 | 49 | /* Define to the one symbol short name of this package. */ 50 | #define PACKAGE_TARNAME "" 51 | 52 | /* Define to the home page for this package. */ 53 | #define PACKAGE_URL "" 54 | 55 | /* Define to the version of this package. */ 56 | #define PACKAGE_VERSION "" 57 | 58 | /* Define to 1 if you have the ANSI C header files. */ 59 | #define STDC_HEADERS 1 60 | -------------------------------------------------------------------------------- /codes/resource/config.h.in: -------------------------------------------------------------------------------- 1 | /* config.h.in. Generated from configure.in by autoheader. */ 2 | 3 | /* Whether to build resource as dynamic module */ 4 | #undef COMPILE_DL_RESOURCE 5 | 6 | /* Define to 1 if you have the header file. */ 7 | #undef HAVE_DLFCN_H 8 | 9 | /* Define to 1 if you have the header file. */ 10 | #undef HAVE_INTTYPES_H 11 | 12 | /* Define to 1 if you have the header file. */ 13 | #undef HAVE_MEMORY_H 14 | 15 | /* Define to 1 if you have the header file. */ 16 | #undef HAVE_STDINT_H 17 | 18 | /* Define to 1 if you have the header file. */ 19 | #undef HAVE_STDLIB_H 20 | 21 | /* Define to 1 if you have the header file. */ 22 | #undef HAVE_STRINGS_H 23 | 24 | /* Define to 1 if you have the header file. */ 25 | #undef HAVE_STRING_H 26 | 27 | /* Define to 1 if you have the header file. */ 28 | #undef HAVE_SYS_STAT_H 29 | 30 | /* Define to 1 if you have the header file. */ 31 | #undef HAVE_SYS_TYPES_H 32 | 33 | /* Define to 1 if you have the header file. */ 34 | #undef HAVE_UNISTD_H 35 | 36 | /* Define to 1 if your C compiler doesn't accept -c and -o together. */ 37 | #undef NO_MINUS_C_MINUS_O 38 | 39 | /* Define to the address where bug reports for this package should be sent. */ 40 | #undef PACKAGE_BUGREPORT 41 | 42 | /* Define to the full name of this package. */ 43 | #undef PACKAGE_NAME 44 | 45 | /* Define to the full name and version of this package. */ 46 | #undef PACKAGE_STRING 47 | 48 | /* Define to the one symbol short name of this package. */ 49 | #undef PACKAGE_TARNAME 50 | 51 | /* Define to the home page for this package. */ 52 | #undef PACKAGE_URL 53 | 54 | /* Define to the version of this package. */ 55 | #undef PACKAGE_VERSION 56 | 57 | /* Define to 1 if you have the ANSI C header files. */ 58 | #undef STDC_HEADERS 59 | -------------------------------------------------------------------------------- /codes/resource/config.m4: -------------------------------------------------------------------------------- 1 | dnl $Id$ 2 | dnl config.m4 for extension resource 3 | 4 | dnl Comments in this file start with the string 'dnl'. 5 | dnl Remove where necessary. This file will not work 6 | dnl without editing. 7 | 8 | dnl If your extension references something external, use with: 9 | 10 | dnl PHP_ARG_WITH(resource, for resource support, 11 | dnl Make sure that the comment is aligned: 12 | dnl [ --with-resource Include resource support]) 13 | 14 | dnl Otherwise use enable: 15 | 16 | PHP_ARG_ENABLE(resource, whether to enable resource support, 17 | dnl Make sure that the comment is aligned: 18 | [ --enable-resource Enable resource support]) 19 | 20 | if test "$PHP_RESOURCE" != "no"; then 21 | dnl Write more examples of tests here... 22 | 23 | dnl # --with-resource -> check with-path 24 | dnl SEARCH_PATH="/usr/local /usr" # you might want to change this 25 | dnl SEARCH_FOR="/include/resource.h" # you most likely want to change this 26 | dnl if test -r $PHP_RESOURCE/$SEARCH_FOR; then # path given as parameter 27 | dnl RESOURCE_DIR=$PHP_RESOURCE 28 | dnl else # search default path list 29 | dnl AC_MSG_CHECKING([for resource files in default path]) 30 | dnl for i in $SEARCH_PATH ; do 31 | dnl if test -r $i/$SEARCH_FOR; then 32 | dnl RESOURCE_DIR=$i 33 | dnl AC_MSG_RESULT(found in $i) 34 | dnl fi 35 | dnl done 36 | dnl fi 37 | dnl 38 | dnl if test -z "$RESOURCE_DIR"; then 39 | dnl AC_MSG_RESULT([not found]) 40 | dnl AC_MSG_ERROR([Please reinstall the resource distribution]) 41 | dnl fi 42 | 43 | dnl # --with-resource -> add include path 44 | dnl PHP_ADD_INCLUDE($RESOURCE_DIR/include) 45 | 46 | dnl # --with-resource -> check for lib and symbol presence 47 | dnl LIBNAME=resource # you may want to change this 48 | dnl LIBSYMBOL=resource # you most likely want to change this 49 | 50 | dnl PHP_CHECK_LIBRARY($LIBNAME,$LIBSYMBOL, 51 | dnl [ 52 | dnl PHP_ADD_LIBRARY_WITH_PATH($LIBNAME, $RESOURCE_DIR/$PHP_LIBDIR, RESOURCE_SHARED_LIBADD) 53 | dnl AC_DEFINE(HAVE_RESOURCELIB,1,[ ]) 54 | dnl ],[ 55 | dnl AC_MSG_ERROR([wrong resource lib version or lib not found]) 56 | dnl ],[ 57 | dnl -L$RESOURCE_DIR/$PHP_LIBDIR -lm 58 | dnl ]) 59 | dnl 60 | dnl PHP_SUBST(RESOURCE_SHARED_LIBADD) 61 | 62 | PHP_NEW_EXTENSION(resource, resource.c, $ext_shared) 63 | fi 64 | -------------------------------------------------------------------------------- /codes/resource/config.nice: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # 3 | # Created by configure 4 | 5 | './configure' \ 6 | '--with-php-config=/opt/php-debug/bin/php-config' \ 7 | "$@" 8 | -------------------------------------------------------------------------------- /codes/resource/config.w32: -------------------------------------------------------------------------------- 1 | // $Id$ 2 | // vim:ft=javascript 3 | 4 | // If your extension references something external, use ARG_WITH 5 | // ARG_WITH("resource", "for resource support", "no"); 6 | 7 | // Otherwise, use ARG_ENABLE 8 | // ARG_ENABLE("resource", "enable resource support", "no"); 9 | 10 | if (PHP_RESOURCE != "no") { 11 | EXTENSION("resource", "resource.c"); 12 | } 13 | 14 | -------------------------------------------------------------------------------- /codes/resource/install-sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/resource/install-sh -------------------------------------------------------------------------------- /codes/resource/missing: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/resource/missing -------------------------------------------------------------------------------- /codes/resource/mkinstalldirs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/resource/mkinstalldirs -------------------------------------------------------------------------------- /codes/resource/modules/resource.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/resource/modules/resource.so -------------------------------------------------------------------------------- /codes/resource/php_resource.h: -------------------------------------------------------------------------------- 1 | /* 2 | +----------------------------------------------------------------------+ 3 | | PHP Version 5 | 4 | +----------------------------------------------------------------------+ 5 | | Copyright (c) 1997-2014 The PHP Group | 6 | +----------------------------------------------------------------------+ 7 | | This source file is subject to version 3.01 of the PHP license, | 8 | | that is bundled with this package in the file LICENSE, and is | 9 | | available through the world-wide-web at the following url: | 10 | | http://www.php.net/license/3_01.txt | 11 | | If you did not receive a copy of the PHP license and are unable to | 12 | | obtain it through the world-wide-web, please send a note to | 13 | | license@php.net so we can mail you a copy immediately. | 14 | +----------------------------------------------------------------------+ 15 | | Author: | 16 | +----------------------------------------------------------------------+ 17 | */ 18 | 19 | /* $Id$ */ 20 | 21 | #ifndef PHP_RESOURCE_H 22 | #define PHP_RESOURCE_H 23 | 24 | extern zend_module_entry resource_module_entry; 25 | #define phpext_resource_ptr &resource_module_entry 26 | 27 | #define PHP_RESOURCE_VERSION "0.1.0" /* Replace with version number for your extension */ 28 | 29 | #ifdef PHP_WIN32 30 | # define PHP_RESOURCE_API __declspec(dllexport) 31 | #elif defined(__GNUC__) && __GNUC__ >= 4 32 | # define PHP_RESOURCE_API __attribute__ ((visibility("default"))) 33 | #else 34 | # define PHP_RESOURCE_API 35 | #endif 36 | 37 | #ifdef ZTS 38 | #include "TSRM.h" 39 | #endif 40 | 41 | PHP_MINIT_FUNCTION(resource); 42 | 43 | 44 | #ifdef ZTS 45 | #define RESOURCE_G(v) TSRMG(resource_globals_id, zend_resource_globals *, v) 46 | #else 47 | #define RESOURCE_G(v) (resource_globals.v) 48 | #endif 49 | 50 | #endif /* PHP_RESOURCE_H */ 51 | 52 | 53 | /* 54 | * Local variables: 55 | * tab-width: 4 56 | * c-basic-offset: 4 57 | * End: 58 | * vim600: noet sw=4 ts=4 fdm=marker 59 | * vim<600: noet sw=4 ts=4 60 | */ 61 | -------------------------------------------------------------------------------- /codes/resource/resource.la: -------------------------------------------------------------------------------- 1 | # resource.la - a libtool library file 2 | # Generated by ltmain.sh - GNU libtool 1.5.26 (1.1220.2.492 2008/01/30 06:40:56) 3 | # 4 | # Please DO NOT delete this file! 5 | # It is necessary for linking the library. 6 | 7 | # The name that we can dlopen(3). 8 | dlname='resource.so' 9 | 10 | # Names of this library. 11 | library_names='resource.so resource.so resource.so' 12 | 13 | # The name of the static archive. 14 | old_library='' 15 | 16 | # Libraries that this one depends upon. 17 | dependency_libs='' 18 | 19 | # Version information for resource. 20 | current=0 21 | age=0 22 | revision=0 23 | 24 | # Is this an already installed library? 25 | installed=no 26 | 27 | # Should we warn about portability when linking against -modules? 28 | shouldnotlink=yes 29 | 30 | # Files to dlopen/dlpreopen 31 | dlopen='' 32 | dlpreopen='' 33 | 34 | # Directory that this library needs to be installed in: 35 | libdir='/Users/kentchen/GitHub/php/php-5.5.20/ext/resource/modules' 36 | -------------------------------------------------------------------------------- /codes/resource/resource.lo: -------------------------------------------------------------------------------- 1 | # resource.lo - a libtool object file 2 | # Generated by ltmain.sh - GNU libtool 1.5.26 (1.1220.2.492 2008/01/30 06:40:56) 3 | # 4 | # Please DO NOT delete this file! 5 | # It is necessary for linking the library. 6 | 7 | # Name of the PIC object. 8 | pic_object='.libs/resource.o' 9 | 10 | # Name of the non-PIC object. 11 | non_pic_object=none 12 | 13 | -------------------------------------------------------------------------------- /codes/resource/resource.php: -------------------------------------------------------------------------------- 1 | "; 3 | 4 | if(!extension_loaded('resource')) { 5 | dl('resource.' . PHP_SHLIB_SUFFIX); 6 | } 7 | 8 | $person = person_create("leon", 35); 9 | var_dump($person); 10 | 11 | 12 | echo person_get_name($person)."\n"; 13 | 14 | ?> 15 | -------------------------------------------------------------------------------- /codes/resource/tests/001.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | Check for resource presence 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | 20 | --EXPECT-- 21 | resource extension is available 22 | -------------------------------------------------------------------------------- /codes/return/.deps: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/return/.deps -------------------------------------------------------------------------------- /codes/return/.libs/return.la: -------------------------------------------------------------------------------- 1 | ../return.la -------------------------------------------------------------------------------- /codes/return/.libs/return.lai: -------------------------------------------------------------------------------- 1 | # return.la - a libtool library file 2 | # Generated by ltmain.sh - GNU libtool 1.5.26 (1.1220.2.492 2008/01/30 06:40:56) 3 | # 4 | # Please DO NOT delete this file! 5 | # It is necessary for linking the library. 6 | 7 | # The name that we can dlopen(3). 8 | dlname='return.so' 9 | 10 | # Names of this library. 11 | library_names='return.so return.so return.so' 12 | 13 | # The name of the static archive. 14 | old_library='' 15 | 16 | # Libraries that this one depends upon. 17 | dependency_libs='' 18 | 19 | # Version information for return. 20 | current=0 21 | age=0 22 | revision=0 23 | 24 | # Is this an already installed library? 25 | installed=yes 26 | 27 | # Should we warn about portability when linking against -modules? 28 | shouldnotlink=yes 29 | 30 | # Files to dlopen/dlpreopen 31 | dlopen='' 32 | dlpreopen='' 33 | 34 | # Directory that this library needs to be installed in: 35 | libdir='/Users/kentchen/GitHub/php/php-5.5.20/ext/return/modules' 36 | -------------------------------------------------------------------------------- /codes/return/.libs/return.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/return/.libs/return.o -------------------------------------------------------------------------------- /codes/return/.libs/return.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/return/.libs/return.so -------------------------------------------------------------------------------- /codes/return/.libs/return.so.dSYM/Contents/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleIdentifier 8 | com.apple.xcode.dsym.return.so 9 | CFBundleInfoDictionaryVersion 10 | 6.0 11 | CFBundlePackageType 12 | dSYM 13 | CFBundleSignature 14 | ???? 15 | CFBundleShortVersionString 16 | 1.0 17 | CFBundleVersion 18 | 1 19 | 20 | 21 | -------------------------------------------------------------------------------- /codes/return/.libs/return.so.dSYM/Contents/Resources/DWARF/return.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/return/.libs/return.so.dSYM/Contents/Resources/DWARF/return.so -------------------------------------------------------------------------------- /codes/return/.svnignore: -------------------------------------------------------------------------------- 1 | .deps 2 | *.lo 3 | *.la 4 | -------------------------------------------------------------------------------- /codes/return/CREDITS: -------------------------------------------------------------------------------- 1 | return 2 | -------------------------------------------------------------------------------- /codes/return/EXPERIMENTAL: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/return/EXPERIMENTAL -------------------------------------------------------------------------------- /codes/return/Makefile.fragments: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/return/Makefile.fragments -------------------------------------------------------------------------------- /codes/return/Makefile.objects: -------------------------------------------------------------------------------- 1 | return.lo: /Users/kentchen/GitHub/php/php-5.5.20/ext/return/return.c 2 | $(LIBTOOL) --mode=compile $(CC) -I. -I/Users/kentchen/GitHub/php/php-5.5.20/ext/return $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) -c /Users/kentchen/GitHub/php/php-5.5.20/ext/return/return.c -o return.lo 3 | $(phplibdir)/return.la: ./return.la 4 | $(LIBTOOL) --mode=install cp ./return.la $(phplibdir) 5 | 6 | ./return.la: $(shared_objects_return) $(RETURN_SHARED_DEPENDENCIES) 7 | $(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_return) $(RETURN_SHARED_LIBADD) 8 | 9 | -------------------------------------------------------------------------------- /codes/return/build/scan_makefile_in.awk: -------------------------------------------------------------------------------- 1 | BEGIN { 2 | mode=0 3 | sources="" 4 | } 5 | 6 | mode == 0 && /^LTLIBRARY_SOURCES.*\\$/ { 7 | if (match($0, "[^=]*$")) { 8 | sources=substr($0, RSTART, RLENGTH-1) 9 | } 10 | mode=1 11 | next 12 | } 13 | 14 | mode == 0 && /^LTLIBRARY_SOURCES.*/ { 15 | if (match($0, "[^=]*$")) { 16 | sources=substr($0, RSTART, RLENGTH) 17 | } 18 | } 19 | 20 | mode == 1 && /.*\\$/ { 21 | sources=sources substr($0, 0, length - 1) 22 | next 23 | } 24 | 25 | mode == 1 { 26 | sources=sources $0 27 | mode=0 28 | } 29 | 30 | END { 31 | print sources 32 | } 33 | -------------------------------------------------------------------------------- /codes/return/build/shtool: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/return/build/shtool -------------------------------------------------------------------------------- /codes/return/config.h: -------------------------------------------------------------------------------- 1 | /* config.h. Generated from config.h.in by configure. */ 2 | /* config.h.in. Generated from configure.in by autoheader. */ 3 | 4 | /* Whether to build return as dynamic module */ 5 | #define COMPILE_DL_RETURN 1 6 | 7 | /* Define to 1 if you have the header file. */ 8 | #define HAVE_DLFCN_H 1 9 | 10 | /* Define to 1 if you have the header file. */ 11 | #define HAVE_INTTYPES_H 1 12 | 13 | /* Define to 1 if you have the header file. */ 14 | #define HAVE_MEMORY_H 1 15 | 16 | /* Define to 1 if you have the header file. */ 17 | #define HAVE_STDINT_H 1 18 | 19 | /* Define to 1 if you have the header file. */ 20 | #define HAVE_STDLIB_H 1 21 | 22 | /* Define to 1 if you have the header file. */ 23 | #define HAVE_STRINGS_H 1 24 | 25 | /* Define to 1 if you have the header file. */ 26 | #define HAVE_STRING_H 1 27 | 28 | /* Define to 1 if you have the header file. */ 29 | #define HAVE_SYS_STAT_H 1 30 | 31 | /* Define to 1 if you have the header file. */ 32 | #define HAVE_SYS_TYPES_H 1 33 | 34 | /* Define to 1 if you have the header file. */ 35 | #define HAVE_UNISTD_H 1 36 | 37 | /* Define to 1 if your C compiler doesn't accept -c and -o together. */ 38 | /* #undef NO_MINUS_C_MINUS_O */ 39 | 40 | /* Define to the address where bug reports for this package should be sent. */ 41 | #define PACKAGE_BUGREPORT "" 42 | 43 | /* Define to the full name of this package. */ 44 | #define PACKAGE_NAME "" 45 | 46 | /* Define to the full name and version of this package. */ 47 | #define PACKAGE_STRING "" 48 | 49 | /* Define to the one symbol short name of this package. */ 50 | #define PACKAGE_TARNAME "" 51 | 52 | /* Define to the home page for this package. */ 53 | #define PACKAGE_URL "" 54 | 55 | /* Define to the version of this package. */ 56 | #define PACKAGE_VERSION "" 57 | 58 | /* Define to 1 if you have the ANSI C header files. */ 59 | #define STDC_HEADERS 1 60 | -------------------------------------------------------------------------------- /codes/return/config.h.in: -------------------------------------------------------------------------------- 1 | /* config.h.in. Generated from configure.in by autoheader. */ 2 | 3 | /* Whether to build return as dynamic module */ 4 | #undef COMPILE_DL_RETURN 5 | 6 | /* Define to 1 if you have the header file. */ 7 | #undef HAVE_DLFCN_H 8 | 9 | /* Define to 1 if you have the header file. */ 10 | #undef HAVE_INTTYPES_H 11 | 12 | /* Define to 1 if you have the header file. */ 13 | #undef HAVE_MEMORY_H 14 | 15 | /* Define to 1 if you have the header file. */ 16 | #undef HAVE_STDINT_H 17 | 18 | /* Define to 1 if you have the header file. */ 19 | #undef HAVE_STDLIB_H 20 | 21 | /* Define to 1 if you have the header file. */ 22 | #undef HAVE_STRINGS_H 23 | 24 | /* Define to 1 if you have the header file. */ 25 | #undef HAVE_STRING_H 26 | 27 | /* Define to 1 if you have the header file. */ 28 | #undef HAVE_SYS_STAT_H 29 | 30 | /* Define to 1 if you have the header file. */ 31 | #undef HAVE_SYS_TYPES_H 32 | 33 | /* Define to 1 if you have the header file. */ 34 | #undef HAVE_UNISTD_H 35 | 36 | /* Define to 1 if your C compiler doesn't accept -c and -o together. */ 37 | #undef NO_MINUS_C_MINUS_O 38 | 39 | /* Define to the address where bug reports for this package should be sent. */ 40 | #undef PACKAGE_BUGREPORT 41 | 42 | /* Define to the full name of this package. */ 43 | #undef PACKAGE_NAME 44 | 45 | /* Define to the full name and version of this package. */ 46 | #undef PACKAGE_STRING 47 | 48 | /* Define to the one symbol short name of this package. */ 49 | #undef PACKAGE_TARNAME 50 | 51 | /* Define to the home page for this package. */ 52 | #undef PACKAGE_URL 53 | 54 | /* Define to the version of this package. */ 55 | #undef PACKAGE_VERSION 56 | 57 | /* Define to 1 if you have the ANSI C header files. */ 58 | #undef STDC_HEADERS 59 | -------------------------------------------------------------------------------- /codes/return/config.m4: -------------------------------------------------------------------------------- 1 | PHP_ARG_ENABLE(return, whether to enable return support, 2 | [ --enable-return Enable return support]) 3 | 4 | if test "$PHP_RETURN" != "no"; then 5 | PHP_NEW_EXTENSION(return, return.c, $ext_shared) 6 | fi 7 | -------------------------------------------------------------------------------- /codes/return/config.nice: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # 3 | # Created by configure 4 | 5 | './configure' \ 6 | '--with-php-config=php-config' \ 7 | "$@" 8 | -------------------------------------------------------------------------------- /codes/return/config.w32: -------------------------------------------------------------------------------- 1 | // $Id$ 2 | // vim:ft=javascript 3 | 4 | // If your extension references something external, use ARG_WITH 5 | // ARG_WITH("return", "for return support", "no"); 6 | 7 | // Otherwise, use ARG_ENABLE 8 | // ARG_ENABLE("return", "enable return support", "no"); 9 | 10 | if (PHP_RETURN != "no") { 11 | EXTENSION("return", "return.c"); 12 | } 13 | 14 | -------------------------------------------------------------------------------- /codes/return/install-sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/return/install-sh -------------------------------------------------------------------------------- /codes/return/missing: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/return/missing -------------------------------------------------------------------------------- /codes/return/mkinstalldirs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/return/mkinstalldirs -------------------------------------------------------------------------------- /codes/return/modules/return.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/return/modules/return.so -------------------------------------------------------------------------------- /codes/return/return.la: -------------------------------------------------------------------------------- 1 | # return.la - a libtool library file 2 | # Generated by ltmain.sh - GNU libtool 1.5.26 (1.1220.2.492 2008/01/30 06:40:56) 3 | # 4 | # Please DO NOT delete this file! 5 | # It is necessary for linking the library. 6 | 7 | # The name that we can dlopen(3). 8 | dlname='return.so' 9 | 10 | # Names of this library. 11 | library_names='return.so return.so return.so' 12 | 13 | # The name of the static archive. 14 | old_library='' 15 | 16 | # Libraries that this one depends upon. 17 | dependency_libs='' 18 | 19 | # Version information for return. 20 | current=0 21 | age=0 22 | revision=0 23 | 24 | # Is this an already installed library? 25 | installed=no 26 | 27 | # Should we warn about portability when linking against -modules? 28 | shouldnotlink=yes 29 | 30 | # Files to dlopen/dlpreopen 31 | dlopen='' 32 | dlpreopen='' 33 | 34 | # Directory that this library needs to be installed in: 35 | libdir='/Users/kentchen/GitHub/php/php-5.5.20/ext/return/modules' 36 | -------------------------------------------------------------------------------- /codes/return/return.lo: -------------------------------------------------------------------------------- 1 | # return.lo - a libtool object file 2 | # Generated by ltmain.sh - GNU libtool 1.5.26 (1.1220.2.492 2008/01/30 06:40:56) 3 | # 4 | # Please DO NOT delete this file! 5 | # It is necessary for linking the library. 6 | 7 | # Name of the PIC object. 8 | pic_object='.libs/return.o' 9 | 10 | # Name of the non-PIC object. 11 | non_pic_object=none 12 | 13 | -------------------------------------------------------------------------------- /codes/return/return.php: -------------------------------------------------------------------------------- 1 | "; 3 | 4 | if(!extension_loaded('return')) { 5 | dl('return.' . PHP_SHLIB_SUFFIX); 6 | } 7 | $module = 'return'; 8 | $functions = get_extension_funcs($module); 9 | echo "Functions available in the test extension:$br\n"; 10 | 11 | $func = "return_bool"; 12 | echo call_user_func($func)."\n"; 13 | 14 | $func = "return_string"; 15 | echo call_user_func($func)."\n"; 16 | 17 | $func = "return_string1"; 18 | echo call_user_func($func)."\n"; 19 | 20 | $func = "return_long"; 21 | echo call_user_func($func)."\n"; 22 | 23 | $func = "return_array"; 24 | print_r(call_user_func($func)); 25 | 26 | $func = "return_object"; 27 | print_r(call_user_func($func)); 28 | 29 | $func = "return_null"; 30 | echo (is_null(call_user_func($func))?"is null":"not null")."\n"; 31 | 32 | $func = "return_double"; 33 | echo call_user_func($func)."\n"; 34 | 35 | ?> 36 | -------------------------------------------------------------------------------- /codes/return/tests/001.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | Check for return presence 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | 20 | --EXPECT-- 21 | return extension is available 22 | -------------------------------------------------------------------------------- /codes/zval1/.svnignore: -------------------------------------------------------------------------------- 1 | .deps 2 | *.lo 3 | *.la 4 | -------------------------------------------------------------------------------- /codes/zval1/CREDITS: -------------------------------------------------------------------------------- 1 | zval1 2 | -------------------------------------------------------------------------------- /codes/zval1/EXPERIMENTAL: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Leon2012/php-ext/a0969990e6f83d144e0b5a64e7b4ae7fca52b2fb/codes/zval1/EXPERIMENTAL -------------------------------------------------------------------------------- /codes/zval1/config.m4: -------------------------------------------------------------------------------- 1 | 2 | dnl PHP_ARG_WITH(zval1, for zval1 support, 3 | dnl Make sure that the comment is aligned: 4 | dnl [ --with-zval1 Include zval1 support]) 5 | 6 | 7 | PHP_ARG_ENABLE(zval1, whether to enable zval1 support, 8 | [ --enable-zval1 Enable zval1 support]) 9 | 10 | if test "$PHP_ZVAL1" != "no"; then 11 | PHP_NEW_EXTENSION(zval1, zval1.c, $ext_shared) 12 | fi 13 | -------------------------------------------------------------------------------- /codes/zval1/config.w32: -------------------------------------------------------------------------------- 1 | // $Id$ 2 | // vim:ft=javascript 3 | 4 | // If your extension references something external, use ARG_WITH 5 | // ARG_WITH("zval1", "for zval1 support", "no"); 6 | 7 | // Otherwise, use ARG_ENABLE 8 | // ARG_ENABLE("zval1", "enable zval1 support", "no"); 9 | 10 | if (PHP_ZVAL1 != "no") { 11 | EXTENSION("zval1", "zval1.c"); 12 | } 13 | 14 | -------------------------------------------------------------------------------- /codes/zval1/tests/001.phpt: -------------------------------------------------------------------------------- 1 | --TEST-- 2 | Check for zval1 presence 3 | --SKIPIF-- 4 | 5 | --FILE-- 6 | 20 | --EXPECT-- 21 | zval1 extension is available 22 | -------------------------------------------------------------------------------- /codes/zval1/zval1.php: -------------------------------------------------------------------------------- 1 | "; 3 | 4 | if(!extension_loaded('zval1')) { 5 | dl('zval1.' . PHP_SHLIB_SUFFIX); 6 | } 7 | echo dump_zval_type("test")."\n"; 8 | echo dump_zval_type(1)."\n"; 9 | echo dump_zval_type(NULL)."\n"; 10 | echo dump_zval_type(0.5)."\n"; 11 | echo dump_zval_type(array())."\n"; 12 | echo dump_zval_type(new stdClass())."\n"; 13 | 14 | define("PI", 3.1415926); 15 | echo dump_zval_type(constant("PI"))."\n"; 16 | 17 | 18 | echo "value:". dump_zval_value("test") . "\n"; 19 | print_r(dump_zval_value(array("arr1"))); 20 | print_r(dump_zval_value(new stdClass())); 21 | echo "value:". dump_zval_value(1.23) . "\n"; 22 | //echo "value:". dump_zval_value(array("arr1")) . "\n"; 23 | 24 | 25 | echo convert_zval("10") . "\n"; 26 | 27 | ?> 28 | --------------------------------------------------------------------------------