diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..91bef25 --- /dev/null +++ b/.gitignore @@ -0,0 +1,35 @@ +*.lo +*.la +.libs +acinclude.m4 +aclocal.m4 +autom4te.cache +build +config.guess +config.h +config.h.in +config.log +config.nice +config.status +config.sub +configure +configure.ac +configure.in +include +install-sh +libtool +ltmain.sh +Makefile +Makefile.fragments +Makefile.global +Makefile.objects +missing +mkinstalldirs +modules +run-tests.php +tests/*/*.diff +tests/*/*.out +tests/*/*.php +tests/*/*.exp +tests/*/*.log +tests/*/*.sh diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json new file mode 100644 index 0000000..182a025 --- /dev/null +++ b/.vscode/c_cpp_properties.json @@ -0,0 +1,17 @@ +{ + "configurations": [ + { + "name": "Linux", + "includePath": [ + "${workspaceFolder}/**" + ], + "defines": [], + "compilerPath": "/usr/bin/gcc", + "cStandard": "gnu17", + "cppStandard": "gnu++14", + "intelliSenseMode": "linux-gcc-x64", + "configurationProvider": "ms-vscode.makefile-tools" + } + ], + "version": 4 +} \ No newline at end of file diff --git a/.vscode/configurationCache.log b/.vscode/configurationCache.log new file mode 100644 index 0000000..f3c70fb --- /dev/null +++ b/.vscode/configurationCache.log @@ -0,0 +1 @@ +{"buildTargets":["/home/xingzi/projects/php-7.4.30/ext/ecore/modules/ecore.la","all","build-binaries","build-modules","clean","distclean","ecore.la","ecore.lo","install","install-binaries","install-headers","install-modules","install-sapi","libphp.la","libs/libphp.bundle","prof-clean","prof-gen","prof-use","test"],"launchTargets":[],"customConfigurationProvider":{"workspaceBrowse":{"browsePath":["/home/xingzi/projects/php-7.4.30/ext/ecore","/home/xingzi/projects/php-7.4.30/ext/ecore/include","/home/xingzi/projects/php-7.4.30/ext/ecore/main","/usr/include/php/20190902","/usr/include/php/20190902/TSRM","/usr/include/php/20190902/Zend","/usr/include/php/20190902/ext","/usr/include/php/20190902/ext/date/lib","/usr/include/php/20190902/ext/json/lib","/usr/include/php/20190902/main"],"compilerArgs":["-g","-O2","-c","/home/xingzi/projects/php-7.4.30/ext/ecore/ecore.c","-o","ecore.lo"],"compilerPath":"/usr/bin/cc","windowsSdkVersion":""},"fileIndex":[["/home/xingzi/projects/php-7.4.30/ext/ecore/ecore.c",{"uri":{"$mid":1,"fsPath":"/home/xingzi/projects/php-7.4.30/ext/ecore/ecore.c","path":"/home/xingzi/projects/php-7.4.30/ext/ecore/ecore.c","scheme":"file"},"configuration":{"defines":["PHP_ATOM_INC","HAVE_CONFIG_H"],"includePath":["/home/xingzi/projects/php-7.4.30/ext/ecore","/home/xingzi/projects/php-7.4.30/ext/ecore","/home/xingzi/projects/php-7.4.30/ext/ecore/include","/home/xingzi/projects/php-7.4.30/ext/ecore/main","/home/xingzi/projects/php-7.4.30/ext/ecore","/usr/include/php/20190902","/usr/include/php/20190902/main","/usr/include/php/20190902/TSRM","/usr/include/php/20190902/Zend","/usr/include/php/20190902/ext","/usr/include/php/20190902/ext/date/lib","/usr/include/php/20190902/ext/json/lib"],"forcedInclude":[],"compilerPath":"/usr/bin/cc","compilerArgs":["-g","-O2","-c","/home/xingzi/projects/php-7.4.30/ext/ecore/ecore.c","-o","ecore.lo"],"windowsSdkVersion":""},"compileCommand":{"command":" cc -I. -I/home/xingzi/projects/php-7.4.30/ext/ecore -DPHP_ATOM_INC -I/home/xingzi/projects/php-7.4.30/ext/ecore/include -I/home/xingzi/projects/php-7.4.30/ext/ecore/main -I/home/xingzi/projects/php-7.4.30/ext/ecore -I/usr/include/php/20190902 -I/usr/include/php/20190902/main -I/usr/include/php/20190902/TSRM -I/usr/include/php/20190902/Zend -I/usr/include/php/20190902/ext -I/usr/include/php/20190902/ext/date/lib -I/usr/include/php/20190902/ext/json/lib -DHAVE_CONFIG_H -g -O2 -c /home/xingzi/projects/php-7.4.30/ext/ecore/ecore.c -o ecore.lo ","directory":"/home/xingzi/projects/php-7.4.30/ext/ecore","file":"/home/xingzi/projects/php-7.4.30/ext/ecore/ecore.c"}}]]}} \ No newline at end of file diff --git a/.vscode/dryrun.log b/.vscode/dryrun.log new file mode 100644 index 0000000..8aa9c8b --- /dev/null +++ b/.vscode/dryrun.log @@ -0,0 +1,11 @@ +make --dry-run --always-make --keep-going --print-directory +make: Entering directory '/home/xingzi/projects/php-7.4.30/ext/ecore' +/bin/bash /home/xingzi/projects/php-7.4.30/ext/ecore/libtool --mode=compile cc -I. -I/home/xingzi/projects/php-7.4.30/ext/ecore -DPHP_ATOM_INC -I/home/xingzi/projects/php-7.4.30/ext/ecore/include -I/home/xingzi/projects/php-7.4.30/ext/ecore/main -I/home/xingzi/projects/php-7.4.30/ext/ecore -I/usr/include/php/20190902 -I/usr/include/php/20190902/main -I/usr/include/php/20190902/TSRM -I/usr/include/php/20190902/Zend -I/usr/include/php/20190902/ext -I/usr/include/php/20190902/ext/date/lib -I/usr/include/php/20190902/ext/json/lib -DHAVE_CONFIG_H -g -O2 -c /home/xingzi/projects/php-7.4.30/ext/ecore/ecore.c -o ecore.lo +/bin/bash /home/xingzi/projects/php-7.4.30/ext/ecore/libtool --mode=link cc -DPHP_ATOM_INC -I/home/xingzi/projects/php-7.4.30/ext/ecore/include -I/home/xingzi/projects/php-7.4.30/ext/ecore/main -I/home/xingzi/projects/php-7.4.30/ext/ecore -I/usr/include/php/20190902 -I/usr/include/php/20190902/main -I/usr/include/php/20190902/TSRM -I/usr/include/php/20190902/Zend -I/usr/include/php/20190902/ext -I/usr/include/php/20190902/ext/date/lib -I/usr/include/php/20190902/ext/json/lib -DHAVE_CONFIG_H -g -O2 -o ecore.la -export-dynamic -avoid-version -prefer-pic -module -rpath /home/xingzi/projects/php-7.4.30/ext/ecore/modules ecore.lo +/bin/bash /home/xingzi/projects/php-7.4.30/ext/ecore/libtool --mode=install cp ./ecore.la /home/xingzi/projects/php-7.4.30/ext/ecore/modules +echo +echo "Build complete." +echo "Don't forget to run 'make test'." +echo +make: Leaving directory '/home/xingzi/projects/php-7.4.30/ext/ecore' + diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..8c68086 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,15 @@ +{ + "files.associations": { + "curl.h": "c", + "typeinfo": "c", + "info.h": "c", + "cjson.h": "c", + "php.h": "c", + "php_ecore.h": "c", + "md5.h": "c", + "php_json.h": "c", + "zend_api.h": "c", + "zend_smart_str.h": "c" + }, + "intelephense.diagnostics.undefinedFunctions": false +} \ No newline at end of file diff --git a/.vscode/targets.log b/.vscode/targets.log new file mode 100644 index 0000000..7058d2d --- /dev/null +++ b/.vscode/targets.log @@ -0,0 +1,563 @@ +make all --print-data-base --no-builtin-variables --no-builtin-rules --question +# GNU Make 4.2.1 +# Built for x86_64-pc-linux-gnu +# Copyright (C) 1988-2016 Free Software Foundation, Inc. +# License GPLv3+: GNU GPL version 3 or later +# This is free software: you are free to change and redistribute it. +# There is NO WARRANTY, to the extent permitted by law. + +# Make data base, printed on Tue Jun 28 07:56:36 2022 + +# Variables + +# automatic +/dev/null 2>&1 + @$(INSTALL) modules/* $(INSTALL_ROOT)$(EXTENSION_DIR) + +/home/xingzi/projects/php-7.4.30/ext/ecore/modules/ecore.la: ecore.la +# Implicit rule search has not been done. +# Implicit/static pattern stem: '' +# File does not exist. +# File has been updated. +# Needs to be updated (-q is set). +# automatic +# @ := /home/xingzi/projects/php-7.4.30/ext/ecore/modules/ecore.la +# automatic +# % := +# automatic +# * := +# automatic +# + := ecore.la +# automatic +# | := +# automatic +# < := ecore.la +# automatic +# ^ := ecore.la +# automatic +# ? := ecore.la +# variable set hash-table stats: +# Load=8/32=25%, Rehash=0, Collisions=1/15=7% +# recipe to execute (from 'Makefile', line 193): + $(LIBTOOL) --mode=install cp ./ecore.la $(phplibdir) + +ecore.la: ecore.lo +# Implicit rule search has not been done. +# Last modified 2022-06-27 20:23:16.543802984 +# File has been updated. +# Successfully updated. +# recipe to execute (from 'Makefile', line 196): + $(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_ecore) $(ECORE_SHARED_LIBADD) + +all: /home/xingzi/projects/php-7.4.30/ext/ecore/modules/ecore.la +# Phony target (prerequisite of .PHONY). +# Command line target. +# Implicit rule search has not been done. +# File does not exist. +# File has been updated. +# Needs to be updated (-q is set). +# variable set hash-table stats: +# Load=0/32=0%, Rehash=0, Collisions=0/7=0% +# recipe to execute (from 'Makefile', line 51): + @echo + @echo "Build complete." + @echo "Don't forget to run 'make test'." + @echo + +.PHONY: all clean install distclean test prof-gen prof-clean prof-use +# Implicit rule search has not been done. +# Modification time never checked. +# File has not been updated. + +# Not a target: +/home/xingzi/projects/php-7.4.30/ext/ecore/ecore.c: +# Implicit rule search has been done. +# Last modified 2022-06-27 20:23:13.983802984 +# File has been updated. +# Successfully updated. + +build-binaries: +# Implicit rule search has not been done. +# Modification time never checked. +# File has not been updated. + +distclean: clean +# Phony target (prerequisite of .PHONY). +# Implicit rule search has not been done. +# File does not exist. +# File has not been updated. +# recipe to execute (from 'Makefile', line 163): + rm -f Makefile config.cache config.log config.status Makefile.objects Makefile.fragments libtool main/php_config.h main/internal_functions_cli.c main/internal_functions.c Zend/zend_dtrace_gen.h Zend/zend_dtrace_gen.h.bak Zend/zend_config.h + rm -f main/build-defs.h scripts/phpize + rm -f ext/date/lib/timelib_config.h ext/mbstring/libmbfl/config.h ext/oci8/oci8_dtrace_gen.h ext/oci8/oci8_dtrace_gen.h.bak + rm -f scripts/man1/phpize.1 scripts/php-config scripts/man1/php-config.1 sapi/cli/php.1 sapi/cgi/php-cgi.1 sapi/phpdbg/phpdbg.1 ext/phar/phar.1 ext/phar/phar.phar.1 + rm -f sapi/fpm/php-fpm.conf sapi/fpm/init.d.php-fpm sapi/fpm/php-fpm.service sapi/fpm/php-fpm.8 sapi/fpm/status.html + rm -f ext/iconv/php_have_bsd_iconv.h ext/iconv/php_have_glibc_iconv.h ext/iconv/php_have_ibm_iconv.h ext/iconv/php_have_iconv.h ext/iconv/php_have_libiconv.h ext/iconv/php_iconv_aliased_libiconv.h ext/iconv/php_iconv_supports_errno.h ext/iconv/php_php_iconv_h_path.h ext/iconv/php_php_iconv_impl.h + rm -f ext/phar/phar.phar ext/phar/phar.php + if test "$(srcdir)" != "$(builddir)"; then \ + rm -f ext/phar/phar/phar.inc; \ + fi + $(EGREP) define'.*include/php' $(top_srcdir)/configure | $(SED) 's/.*>//'|xargs rm -f + +libs/libphp.bundle: +# Implicit rule search has not been done. +# Modification time never checked. +# File has not been updated. +# recipe to execute (from 'Makefile', line 65): + $(CC) $(MH_BUNDLE_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) $(EXTRA_LDFLAGS) $(PHP_GLOBAL_OBJS:.lo=.o) $(PHP_SAPI_OBJS:.lo=.o) $(PHP_FRAMEWORKS) $(EXTRA_LIBS) $(ZEND_EXTRA_LIBS) -o $@ && cp $@ libs/libphp$(PHP_MAJOR_VERSION).so + +# Not a target: +.SUFFIXES: +# Implicit rule search has not been done. +# Modification time never checked. +# File has not been updated. + +# Not a target: +Makefile: +# Implicit rule search has been done. +# Last modified 2022-06-17 11:29:02.960003696 +# File has been updated. +# Successfully updated. + +test: all +# Phony target (prerequisite of .PHONY). +# Implicit rule search has not been done. +# File does not exist. +# File has not been updated. +# recipe to execute (from 'Makefile', line 131): + @if test ! -z "$(PHP_EXECUTABLE)" && test -x "$(PHP_EXECUTABLE)"; then \ + INI_FILE=`$(PHP_EXECUTABLE) -d 'display_errors=stderr' -r 'echo php_ini_loaded_file();' 2> /dev/null`; \ + if test "$$INI_FILE"; then \ + $(EGREP) -h -v $(PHP_DEPRECATED_DIRECTIVES_REGEX) "$$INI_FILE" > $(top_builddir)/tmp-php.ini; \ + else \ + echo > $(top_builddir)/tmp-php.ini; \ + fi; \ + INI_SCANNED_PATH=`$(PHP_EXECUTABLE) -d 'display_errors=stderr' -r '$$a = explode(",\n", trim(php_ini_scanned_files())); echo $$a[0];' 2> /dev/null`; \ + if test "$$INI_SCANNED_PATH"; then \ + INI_SCANNED_PATH=`$(top_srcdir)/build/shtool path -d $$INI_SCANNED_PATH`; \ + $(EGREP) -h -v $(PHP_DEPRECATED_DIRECTIVES_REGEX) "$$INI_SCANNED_PATH"/*.ini >> $(top_builddir)/tmp-php.ini; \ + fi; \ + TEST_PHP_EXECUTABLE=$(PHP_EXECUTABLE) \ + TEST_PHP_SRCDIR=$(top_srcdir) \ + CC="$(CC)" \ + $(PHP_EXECUTABLE) -n -c $(top_builddir)/tmp-php.ini $(PHP_TEST_SETTINGS) $(top_srcdir)/run-tests.php -n -c $(top_builddir)/tmp-php.ini -d extension_dir=$(top_builddir)/modules/ $(PHP_TEST_SHARED_EXTENSIONS) $(TESTS); \ + TEST_RESULT_EXIT_CODE=$$?; \ + rm $(top_builddir)/tmp-php.ini; \ + exit $$TEST_RESULT_EXIT_CODE; \ + else \ + echo "ERROR: Cannot run tests without CLI sapi."; \ + fi + +prof-gen: +# Phony target (prerequisite of .PHONY). +# Implicit rule search has not been done. +# File does not exist. +# File has not been updated. +# recipe to execute (from 'Makefile', line 176): + CCACHE_DISABLE=1 $(MAKE) PROF_FLAGS=-fprofile-generate all + +build-modules: /home/xingzi/projects/php-7.4.30/ext/ecore/modules/ecore.la +# Implicit rule search has not been done. +# Modification time never checked. +# File has not been updated. + +prof-use: +# Phony target (prerequisite of .PHONY). +# Implicit rule search has not been done. +# File does not exist. +# File has not been updated. +# recipe to execute (from 'Makefile', line 185): + CCACHE_DISABLE=1 $(MAKE) PROF_FLAGS=-fprofile-use all + +prof-clean: +# Phony target (prerequisite of .PHONY). +# Implicit rule search has not been done. +# File does not exist. +# File has not been updated. +# recipe to execute (from 'Makefile', line 179): + find . -name \*.lo -o -name \*.o | xargs rm -f + find . -name \*.la -o -name \*.a | xargs rm -f + find . -name \*.so | xargs rm -f + rm -f libphp$(PHP_MAJOR_VERSION).la $(SAPI_CLI_PATH) $(SAPI_CGI_PATH) $(SAPI_LITESPEED_PATH) $(SAPI_FPM_PATH) $(OVERALL_TARGET) modules/* libs/* + +.NOEXPORT: +# Implicit rule search has not been done. +# Modification time never checked. +# File has not been updated. + +# Not a target: +.DEFAULT: +# Implicit rule search has not been done. +# Modification time never checked. +# File has not been updated. + +install-headers: +# Implicit rule search has not been done. +# Modification time never checked. +# File has not been updated. +# recipe to execute (from 'Makefile', line 92): + -@if test "$(INSTALL_HEADERS)"; then \ + for i in `echo $(INSTALL_HEADERS)`; do \ + i=`$(top_srcdir)/build/shtool path -d $$i`; \ + paths="$$paths $(INSTALL_ROOT)$(phpincludedir)/$$i"; \ + done; \ + $(mkinstalldirs) $$paths && \ + echo "Installing header files: $(INSTALL_ROOT)$(phpincludedir)/" && \ + for i in `echo $(INSTALL_HEADERS)`; do \ + if test "$(PHP_PECL_EXTENSION)"; then \ + src=`echo $$i | $(SED) -e "s#ext/$(PHP_PECL_EXTENSION)/##g"`; \ + else \ + src=$$i; \ + fi; \ + if test -f "$(top_srcdir)/$$src"; then \ + $(INSTALL_DATA) $(top_srcdir)/$$src $(INSTALL_ROOT)$(phpincludedir)/$$i; \ + elif test -f "$(top_builddir)/$$src"; then \ + $(INSTALL_DATA) $(top_builddir)/$$src $(INSTALL_ROOT)$(phpincludedir)/$$i; \ + else \ + (cd $(top_srcdir)/$$src && $(INSTALL_DATA) *.h $(INSTALL_ROOT)$(phpincludedir)/$$i; \ + cd $(top_builddir)/$$src && $(INSTALL_DATA) *.h $(INSTALL_ROOT)$(phpincludedir)/$$i) 2>/dev/null || true; \ + fi \ + done; \ + fi + +install-sapi: +# Implicit rule search has not been done. +# Modification time never checked. +# File has not been updated. +# recipe to execute (from 'Makefile', line 70): + @echo "Installing PHP SAPI module: $(PHP_SAPI)" + -@$(mkinstalldirs) $(INSTALL_ROOT)$(bindir) + -@if test ! -r $(phptempdir)/libphp$(PHP_MAJOR_VERSION).$(SHLIB_DL_SUFFIX_NAME); then \ + for i in 0.0.0 0.0 0; do \ + if test -r $(phptempdir)/libphp$(PHP_MAJOR_VERSION).$(SHLIB_DL_SUFFIX_NAME).$$i; then \ + $(LN_S) $(phptempdir)/libphp$(PHP_MAJOR_VERSION).$(SHLIB_DL_SUFFIX_NAME).$$i $(phptempdir)/libphp$(PHP_MAJOR_VERSION).$(SHLIB_DL_SUFFIX_NAME); \ + break; \ + fi; \ + done; \ + fi + @$(INSTALL_IT) + +clean: +# Phony target (prerequisite of .PHONY). +# Implicit rule search has not been done. +# File does not exist. +# File has not been updated. +# recipe to execute (from 'Makefile', line 155): + find . -name \*.gcno -o -name \*.gcda | xargs rm -f + find . -name \*.lo -o -name \*.o | xargs rm -f + find . -name \*.la -o -name \*.a | xargs rm -f + find . -name \*.so | xargs rm -f + find . -name .libs -a -type d|xargs rm -rf + rm -f libphp$(PHP_MAJOR_VERSION).la $(SAPI_CLI_PATH) $(SAPI_CGI_PATH) $(SAPI_LITESPEED_PATH) $(SAPI_FPM_PATH) $(OVERALL_TARGET) modules/* libs/* + +install-binaries: build-binaries +# Implicit rule search has not been done. +# Modification time never checked. +# File has not been updated. + +ecore.lo: /home/xingzi/projects/php-7.4.30/ext/ecore/ecore.c +# Implicit rule search has not been done. +# Last modified 2022-06-27 20:23:16.413802984 +# File has been updated. +# Successfully updated. +# recipe to execute (from 'Makefile', line 191): + $(LIBTOOL) --mode=compile $(CC) -I. -I/home/xingzi/projects/php-7.4.30/ext/ecore $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) -c /home/xingzi/projects/php-7.4.30/ext/ecore/ecore.c -o ecore.lo + +libphp.la: +# Implicit rule search has not been done. +# Modification time never checked. +# File has not been updated. +# recipe to execute (from 'Makefile', line 61): + $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -rpath $(phptempdir) $(EXTRA_LDFLAGS) $(LDFLAGS) $(PHP_RPATHS) $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS) $(EXTRA_LIBS) $(ZEND_EXTRA_LIBS) -o $@ + -@$(LIBTOOL) --silent --mode=install cp $@ $(phptempdir)/$@ >/dev/null 2>&1 + +install: /home/xingzi/projects/php-7.4.30/ext/ecore/modules/ecore.la install-modules install-headers +# Phony target (prerequisite of .PHONY). +# Implicit rule search has not been done. +# File does not exist. +# File has not been updated. + +# files hash-table stats: +# Load=25/1024=2%, Rehash=0, Collisions=0/61=0% +# VPATH Search Paths + +# No 'vpath' search paths. + +# No general ('VPATH' variable) search path. + +# strcache buffers: 1 (0) / strings = 58 / storage = 729 B / avg = 12 B +# current buf: size = 8162 B / used = 729 B / count = 58 / avg = 12 B + +# strcache performance: lookups = 106 / hit rate = 45% +# hash-table stats: +# Load=58/8192=1%, Rehash=0, Collisions=1/106=1% +# Finished Make data base on Tue Jun 28 07:56:36 2022 + + diff --git a/config.m4 b/config.m4 new file mode 100644 index 0000000..cad6c58 --- /dev/null +++ b/config.m4 @@ -0,0 +1,94 @@ +dnl config.m4 for extension ecore + +dnl Comments in this file start with the string 'dnl'. +dnl Remove where necessary. + +dnl If your extension references something external, use 'with': + +PHP_ARG_WITH([ecore], + [for ecore support], + [AS_HELP_STRING([--with-ecore], + [Include ecore support])]) + +dnl Otherwise use 'enable': + +PHP_ARG_ENABLE([ecore], + [whether to enable ecore support], + [AS_HELP_STRING([--enable-ecore], + [Enable ecore support])], + [no]) + +if test "$PHP_ECORE" != "no"; then + dnl Write more examples of tests here... + + dnl Remove this code block if the library does not support pkg-config. + dnl PKG_CHECK_MODULES([LIBFOO], [foo]) + dnl PHP_EVAL_INCLINE($LIBFOO_CFLAGS) + dnl PHP_EVAL_LIBLINE($LIBFOO_LIBS, ECORE_SHARED_LIBADD) + + dnl If you need to check for a particular library version using PKG_CHECK_MODULES, + dnl you can use comparison operators. For example: + dnl PKG_CHECK_MODULES([LIBFOO], [foo >= 1.2.3]) + dnl PKG_CHECK_MODULES([LIBFOO], [foo < 3.4]) + dnl PKG_CHECK_MODULES([LIBFOO], [foo = 1.2.3]) + + dnl Remove this code block if the library supports pkg-config. + dnl --with-ecore -> check with-path + dnl SEARCH_PATH="/usr/local /usr" # you might want to change this + dnl SEARCH_FOR="/include/ecore.h" # you most likely want to change this + dnl if test -r $PHP_ECORE/$SEARCH_FOR; then # path given as parameter + dnl ECORE_DIR=$PHP_ECORE + dnl else # search default path list + dnl AC_MSG_CHECKING([for ecore files in default path]) + dnl for i in $SEARCH_PATH ; do + dnl if test -r $i/$SEARCH_FOR; then + dnl ECORE_DIR=$i + dnl AC_MSG_RESULT(found in $i) + dnl fi + dnl done + dnl fi + dnl + dnl if test -z "$ECORE_DIR"; then + dnl AC_MSG_RESULT([not found]) + dnl AC_MSG_ERROR([Please reinstall the ecore distribution]) + dnl fi + + dnl Remove this code block if the library supports pkg-config. + dnl --with-ecore -> add include path + dnl PHP_ADD_INCLUDE($ECORE_DIR/include) + + dnl Remove this code block if the library supports pkg-config. + dnl --with-ecore -> check for lib and symbol presence + dnl LIBNAME=ECORE # you may want to change this + dnl LIBSYMBOL=ECORE # you most likely want to change this + + dnl If you need to check for a particular library function (e.g. a conditional + dnl or version-dependent feature) and you are using pkg-config: + dnl PHP_CHECK_LIBRARY($LIBNAME, $LIBSYMBOL, + dnl [ + dnl AC_DEFINE(HAVE_ECORE_FEATURE, 1, [ ]) + dnl ],[ + dnl AC_MSG_ERROR([FEATURE not supported by your ecore library.]) + dnl ], [ + dnl $LIBFOO_LIBS + dnl ]) + + dnl If you need to check for a particular library function (e.g. a conditional + dnl or version-dependent feature) and you are not using pkg-config: + dnl PHP_CHECK_LIBRARY($LIBNAME, $LIBSYMBOL, + dnl [ + dnl PHP_ADD_LIBRARY_WITH_PATH($LIBNAME, $ECORE_DIR/$PHP_LIBDIR, ECORE_SHARED_LIBADD) + dnl AC_DEFINE(HAVE_ECORE_FEATURE, 1, [ ]) + dnl ],[ + dnl AC_MSG_ERROR([FEATURE not supported by your ecore library.]) + dnl ],[ + dnl -L$ECORE_DIR/$PHP_LIBDIR -lm + dnl ]) + dnl + dnl PHP_SUBST(ECORE_SHARED_LIBADD) + + dnl In case of no dependencies + AC_DEFINE(HAVE_ECORE, 1, [ Have ecore support ]) + + PHP_NEW_EXTENSION(ecore, ecore.c, $ext_shared) +fi diff --git a/config.w32 b/config.w32 new file mode 100644 index 0000000..92d4d8e --- /dev/null +++ b/config.w32 @@ -0,0 +1,7 @@ +ARG_ENABLE('ecore', 'ecore support', 'no'); + +if (PHP_ECORE != 'no') { + AC_DEFINE('HAVE_ECORE', 1, 'ecore support enabled'); + + EXTENSION('ecore', 'ecore.c', null, '/DZEND_ENABLE_STATIC_TSRMLS_CACHE=1'); +} diff --git a/ecore.c b/ecore.c new file mode 100644 index 0000000..30b7d32 --- /dev/null +++ b/ecore.c @@ -0,0 +1,318 @@ +/* ecore extension for PHP */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "php.h" +#include "ext/standard/info.h" +#include "php_ecore.h" + +#include +#include +#include +#include "json/php_json.h" +#include +#include "zend_smart_str.h" + +int auth_result = 0; + +/* For compatibility with older PHP versions */ +#ifndef ZEND_PARSE_PARAMETERS_NONE +#define ZEND_PARSE_PARAMETERS_NONE() \ + ZEND_PARSE_PARAMETERS_START(0, 0) \ + ZEND_PARSE_PARAMETERS_END() +#endif + +ZEND_DECLARE_MODULE_GLOBALS(ecore) + +static PHP_GINIT_FUNCTION(ecore) +{ +#if defined(COMPILE_DL_BCMATH) && defined(ZTS) + ZEND_TSRMLS_CACHE_UPDATE(); +#endif + ecore_globals->scale = 1; +} + +PHP_MINIT_FUNCTION(ecore) +{ +#if defined(ZTS) && defined(COMPILE_DL_TEST) + ZEND_TSRMLS_CACHE_UPDATE(); +#endif + + REGISTER_LONG_CONSTANT("TEST_SCALE_FACTOR", 2, CONST_CS | CONST_PERSISTENT); + + return SUCCESS; +} + +PHP_FUNCTION(ecore_pass_check) +{ + char *password, *salt, *signed_passwrod; + unsigned char signed_str[16]; + size_t p_len = sizeof(password); + size_t s_len = sizeof(salt); + size_t sp_len = sizeof(signed_passwrod); + char temp[8] = {0}; + unsigned char decrypt[64] = {0}; + + ZEND_PARSE_PARAMETERS_START(3, 3) + Z_PARAM_STRING(password, p_len) + Z_PARAM_STRING(salt, s_len) + ZEND_PARSE_PARAMETERS_END(); + + strcat(password, salt); + int a_len = strlen(password); + MD5(password, a_len, signed_str); + for (int i = 0; i <= 15; i++) + { + sprintf(temp, "%02x", signed_str[i]); + strcat(decrypt, temp); + } + if (signed_passwrod && strcmp(decrypt, signed_passwrod) == 0) + { + RETURN_TRUE; + } + RETURN_FALSE; +} + +PHP_FUNCTION(ecore_pass_create) +{ + char *password, *salt; + unsigned char signed_str[16]; + size_t p_len = sizeof(password); + size_t s_len = sizeof(salt); + char temp[8] = {0}; + unsigned char decrypt[64] = {0}; + + ZEND_PARSE_PARAMETERS_START(2, 2) + Z_PARAM_STRING(password, p_len) + Z_PARAM_STRING(salt, s_len) + ZEND_PARSE_PARAMETERS_END(); + + strcat(password, salt); + int a_len = strlen(password); + MD5(password, a_len, signed_str); + for (int i = 0; i <= 15; i++) + { + sprintf(temp, "%02x", signed_str[i]); + strcat(decrypt, temp); + } + + RETURN_STRING(decrypt); +} + +static long write_data(void *buffer, size_t size, size_t nmemb, void *stream) +{ + FILE *fptr = (FILE *)stream; + fwrite(buffer, size, nmemb, fptr); + return size * nmemb; +} + +static int post_parse(void *buffer, size_t size, size_t nmemb, void *stream) +{ + char value[BUFSIZ] = {0}; + memcpy(value, (char *)buffer, size * nmemb); + // printf("--------%s %s\n", value, strstr(value, "success")); + if (strstr(value, "true")) + { + auth_result = 1; + } + else + { + auth_result = 0; + } + return size * nmemb; +} + +static int org_auth() +{ + char data[BUFSIZ] = ""; + char *file = "../runtime/auth"; + FILE *fp = NULL; + fp = fopen(file, "r"); + if (fp != NULL) + { + char buff[BUFSIZ]; + int i = 0; + while (fscanf(fp, "%s", buff) != EOF) + { + // printf("buff: %s\n", buff); + i++; + if (i == 1) + { + strcat(data, "orgKey="); + strcat(data, buff); + } + else if (i == 2) + { + strcat(data, "&orgHost="); + strcat(data, buff); + } + } + fclose(fp); + // printf("data: %s\n", data); + } + + char *url = "http://140.249.182.90:8081/api/v1/org/auth"; + char *logfile = "king_curl_post.log"; + CURL *curl = NULL; + CURLcode res; + + struct curl_slist *http_header = NULL; + + curl = curl_easy_init(); + + curl_easy_setopt(curl, CURLOPT_URL, url); + curl_easy_setopt(curl, CURLOPT_POSTFIELDS, data); + curl_easy_setopt(curl, CURLOPT_POST, 1); + // curl_easy_setopt(curl, CURLOPT_VERBOSE, 1); + // curl_easy_setopt(curl, CURLOPT_HEADER, 1); + curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1); + curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, post_parse); + // curl_easy_setopt(curl, CURLOPT_WRITEDATA, fptr); + + res = curl_easy_perform(curl); + if (res != CURLE_OK) + { + char *buf = NULL; + if (asprintf(&buf, "curl easy perform error res = %d", res) < 0) + { + return FAILURE; + } + if (buf != NULL) + { + free(buf); + buf = NULL; + } + + // RETVAL_STRING(buf); + return FAILURE; + } + curl_easy_cleanup(curl); + return SUCCESS; +} + +PHP_FUNCTION(json_return) +{ + char *status = "0"; + char *info = ""; + zval *data; + size_t s_len = sizeof(status); + + ZEND_PARSE_PARAMETERS_START(0, 3) + Z_PARAM_OPTIONAL + Z_PARAM_STRING(status, s_len) + Z_PARAM_STRING(info, s_len) + // Z_PARAM_ARRAY(data) + Z_PARAM_ARRAY_OR_OBJECT(data) + ZEND_PARSE_PARAMETERS_END(); + + org_auth(); + // printf("--auth_result------%d \n", auth_result); + if (auth_result == 0) + { + php_printf("{\"status\":%d,\"info\":\"%s\",\"data\":[]}", 0, "非法访问"); + zend_bailout(); + return; + } + + if (ZEND_NUM_ARGS() == 3) + { + smart_str buf = {0}; + php_json_encode(&buf, data, 0); + smart_str_0(&buf); + if (buf.s) + { + php_printf("{\"status\":%d,\"info\":\"%s\",\"data\":%s}", atoi(status), info, buf.s->val); + } + else + { + php_printf("{\"status\":%d,\"info\":\"%s\",\"data\":%s}", atoi(status), info, zend_empty_string->val); + } + smart_str_free(&buf); + } + else + { + php_printf("{\"status\":%d,\"info\":\"%s\",\"data\":[]}", atoi(status), info); + } + + zend_bailout(); + return; +} + +/* {{{ PHP_RINIT_FUNCTION + */ +PHP_RINIT_FUNCTION(ecore) +{ +#if defined(ZTS) && defined(COMPILE_DL_ECORE) + ZEND_TSRMLS_CACHE_UPDATE(); +#endif + + return SUCCESS; +} +/* }}} */ + +/* {{{ PHP_MINFO_FUNCTION + */ +PHP_MINFO_FUNCTION(ecore) +{ + php_info_print_table_start(); + php_info_print_table_header(2, "ecore support", "enabled"); + php_info_print_table_end(); +} +/* }}} */ + +/* {{{ arginfo + */ +ZEND_BEGIN_ARG_INFO(arginfo_ecore_pass_check, 0) +ZEND_ARG_INFO(0, password) +ZEND_ARG_INFO(0, salt) +ZEND_ARG_INFO(0, signed_password) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO(arginfo_ecore_pass_create, 0) +ZEND_ARG_INFO(0, password) +ZEND_ARG_INFO(0, salt) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO(arginfo_json_return, 0) +ZEND_ARG_INFO(0, status) +ZEND_ARG_INFO(0, info) +ZEND_ARG_INFO(0, data) +ZEND_END_ARG_INFO() +/* }}} */ + +/* {{{ ecore_functions[] + */ +static const zend_function_entry ecore_functions[] = { + PHP_FE(ecore_pass_check, arginfo_ecore_pass_check) + PHP_FE(ecore_pass_create, arginfo_ecore_pass_create) + PHP_FE(json_return, arginfo_json_return) + PHP_FE_END}; +/* }}} */ + +/* {{{ ecore_module_entry + */ +zend_module_entry ecore_module_entry = { + STANDARD_MODULE_HEADER, + "ecore", /* Extension name */ + ecore_functions, /* zend_function_entry */ + PHP_MINIT(ecore), /* PHP_MINIT - Module initialization */ + NULL, /* PHP_MSHUTDOWN - Module shutdown */ + PHP_RINIT(ecore), /* PHP_RINIT - Request initialization */ + NULL, /* PHP_RSHUTDOWN - Request shutdown */ + PHP_MINFO(ecore), /* PHP_MINFO - Module info */ + PHP_ECORE_VERSION, /* Version */ + PHP_MODULE_GLOBALS(ecore), + PHP_GINIT(ecore), + NULL, + NULL, + STANDARD_MODULE_PROPERTIES_EX}; +/* }}} */ + +#ifdef COMPILE_DL_ECORE +#ifdef ZTS +ZEND_TSRMLS_CACHE_DEFINE() +#endif +ZEND_GET_MODULE(ecore) +#endif diff --git a/king_curl_post.log b/king_curl_post.log new file mode 100644 index 0000000..e69de29 diff --git a/mf.back b/mf.back new file mode 100644 index 0000000..205ceff --- /dev/null +++ b/mf.back @@ -0,0 +1,199 @@ +srcdir = /home/xingzi/projects/php-7.4.30/ext/ecore +builddir = /home/xingzi/projects/php-7.4.30/ext/ecore +top_srcdir = /home/xingzi/projects/php-7.4.30/ext/ecore +top_builddir = /home/xingzi/projects/php-7.4.30/ext/ecore +EGREP = /usr/bin/grep -E +SED = /usr/bin/sed +CONFIGURE_COMMAND = './configure' +CONFIGURE_OPTIONS = +SHLIB_SUFFIX_NAME = so +SHLIB_DL_SUFFIX_NAME = so +AWK = gawk +shared_objects_ecore = ecore.lo +PHP_PECL_EXTENSION = ecore +PHP_MODULES = $(phplibdir)/ecore.la +PHP_ZEND_EX = +all_targets = $(PHP_MODULES) $(PHP_ZEND_EX) +install_targets = install-modules install-headers +prefix = /usr +exec_prefix = $(prefix) +#libdir = ${exec_prefix}/lib +libdir =/home/xingzi/projects/php-7.4.30/ext/ecore/third +prefix = /usr +phplibdir = /home/xingzi/projects/php-7.4.30/ext/ecore/modules +phpincludedir = /usr/include/php/20190902 +CC = cc +CFLAGS = -g -O2 +CFLAGS_CLEAN = $(CFLAGS) +CPP = cc -E +CPPFLAGS = -DHAVE_CONFIG_H +CXX = +CXXFLAGS = +CXXFLAGS_CLEAN = $(CXXFLAGS) +EXTENSION_DIR = /usr/lib/php/20190902 +PHP_EXECUTABLE = /usr/bin/php7.4 +EXTRA_LDFLAGS = +EXTRA_LIBS = +INCLUDES = -I/usr/include/php/20190902 -I/usr/include/php/20190902/main -I/usr/include/php/20190902/TSRM -I/usr/include/php/20190902/Zend -I/usr/include/php/20190902/ext -I/usr/include/php/20190902/ext/date/lib +LFLAGS = +LDFLAGS = -L +LIBS = /home/xingzi/projects/cJSON/build/libcjson.a +SHARED_LIBTOOL = +LIBTOOL = $(SHELL) $(top_builddir)/libtool +SHELL = /bin/bash +INSTALL_HEADERS = +mkinstalldirs = $(top_srcdir)/build/shtool mkdir -p +INSTALL = $(top_srcdir)/build/shtool install -c +INSTALL_DATA = $(INSTALL) -m 644 + +DEFS = -DPHP_ATOM_INC -I$(top_builddir)/include -I$(top_builddir)/main -I$(top_srcdir) +COMMON_FLAGS = $(DEFS) $(INCLUDES) $(EXTRA_INCLUDES) $(CPPFLAGS) $(PHP_FRAMEWORKPATH) + +all: $(all_targets) + @echo + @echo "Build complete." + @echo "Don't forget to run 'make test'." + @echo + +build-modules: $(PHP_MODULES) $(PHP_ZEND_EX) + +build-binaries: $(PHP_BINARIES) + +libphp$(PHP_MAJOR_VERSION).la: $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS) + $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -rpath $(phptempdir) $(EXTRA_LDFLAGS) $(LDFLAGS) $(PHP_RPATHS) $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS) $(EXTRA_LIBS) $(ZEND_EXTRA_LIBS) -o $@ + -@$(LIBTOOL) --silent --mode=install cp $@ $(phptempdir)/$@ >/dev/null 2>&1 + +libs/libphp$(PHP_MAJOR_VERSION).bundle: $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS) + $(CC) $(MH_BUNDLE_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) $(EXTRA_LDFLAGS) $(PHP_GLOBAL_OBJS:.lo=.o) $(PHP_SAPI_OBJS:.lo=.o) $(PHP_FRAMEWORKS) $(EXTRA_LIBS) $(ZEND_EXTRA_LIBS) -o $@ && cp $@ libs/libphp$(PHP_MAJOR_VERSION).so + +install: $(all_targets) $(install_targets) + +install-sapi: $(OVERALL_TARGET) + @echo "Installing PHP SAPI module: $(PHP_SAPI)" + -@$(mkinstalldirs) $(INSTALL_ROOT)$(bindir) + -@if test ! -r $(phptempdir)/libphp$(PHP_MAJOR_VERSION).$(SHLIB_DL_SUFFIX_NAME); then \ + for i in 0.0.0 0.0 0; do \ + if test -r $(phptempdir)/libphp$(PHP_MAJOR_VERSION).$(SHLIB_DL_SUFFIX_NAME).$$i; then \ + $(LN_S) $(phptempdir)/libphp$(PHP_MAJOR_VERSION).$(SHLIB_DL_SUFFIX_NAME).$$i $(phptempdir)/libphp$(PHP_MAJOR_VERSION).$(SHLIB_DL_SUFFIX_NAME); \ + break; \ + fi; \ + done; \ + fi + @$(INSTALL_IT) + +install-binaries: build-binaries $(install_binary_targets) + +install-modules: build-modules + @test -d modules && \ + $(mkinstalldirs) $(INSTALL_ROOT)$(EXTENSION_DIR) + @echo "Installing shared extensions: $(INSTALL_ROOT)$(EXTENSION_DIR)/" + @rm -f modules/*.la >/dev/null 2>&1 + @$(INSTALL) modules/* $(INSTALL_ROOT)$(EXTENSION_DIR) + +install-headers: + -@if test "$(INSTALL_HEADERS)"; then \ + for i in `echo $(INSTALL_HEADERS)`; do \ + i=`$(top_srcdir)/build/shtool path -d $$i`; \ + paths="$$paths $(INSTALL_ROOT)$(phpincludedir)/$$i"; \ + done; \ + $(mkinstalldirs) $$paths && \ + echo "Installing header files: $(INSTALL_ROOT)$(phpincludedir)/" && \ + for i in `echo $(INSTALL_HEADERS)`; do \ + if test "$(PHP_PECL_EXTENSION)"; then \ + src=`echo $$i | $(SED) -e "s#ext/$(PHP_PECL_EXTENSION)/##g"`; \ + else \ + src=$$i; \ + fi; \ + if test -f "$(top_srcdir)/$$src"; then \ + $(INSTALL_DATA) $(top_srcdir)/$$src $(INSTALL_ROOT)$(phpincludedir)/$$i; \ + elif test -f "$(top_builddir)/$$src"; then \ + $(INSTALL_DATA) $(top_builddir)/$$src $(INSTALL_ROOT)$(phpincludedir)/$$i; \ + else \ + (cd $(top_srcdir)/$$src && $(INSTALL_DATA) *.h $(INSTALL_ROOT)$(phpincludedir)/$$i; \ + cd $(top_builddir)/$$src && $(INSTALL_DATA) *.h $(INSTALL_ROOT)$(phpincludedir)/$$i) 2>/dev/null || true; \ + fi \ + done; \ + fi + +PHP_TEST_SETTINGS = -d 'open_basedir=' -d 'output_buffering=0' -d 'memory_limit=-1' +PHP_TEST_SHARED_EXTENSIONS = ` \ + if test "x$(PHP_MODULES)" != "x"; then \ + for i in $(PHP_MODULES)""; do \ + . $$i; $(top_srcdir)/build/shtool echo -n -- " -d extension=$$dlname"; \ + done; \ + fi; \ + if test "x$(PHP_ZEND_EX)" != "x"; then \ + for i in $(PHP_ZEND_EX)""; do \ + . $$i; $(top_srcdir)/build/shtool echo -n -- " -d zend_extension=$(top_builddir)/modules/$$dlname"; \ + done; \ + fi` +PHP_DEPRECATED_DIRECTIVES_REGEX = '^(magic_quotes_(gpc|runtime|sybase)?|(zend_)?extension(_debug)?(_ts)?)[\t\ ]*=' + +test: all + @if test ! -z "$(PHP_EXECUTABLE)" && test -x "$(PHP_EXECUTABLE)"; then \ + INI_FILE=`$(PHP_EXECUTABLE) -d 'display_errors=stderr' -r 'echo php_ini_loaded_file();' 2> /dev/null`; \ + if test "$$INI_FILE"; then \ + $(EGREP) -h -v $(PHP_DEPRECATED_DIRECTIVES_REGEX) "$$INI_FILE" > $(top_builddir)/tmp-php.ini; \ + else \ + echo > $(top_builddir)/tmp-php.ini; \ + fi; \ + INI_SCANNED_PATH=`$(PHP_EXECUTABLE) -d 'display_errors=stderr' -r '$$a = explode(",\n", trim(php_ini_scanned_files())); echo $$a[0];' 2> /dev/null`; \ + if test "$$INI_SCANNED_PATH"; then \ + INI_SCANNED_PATH=`$(top_srcdir)/build/shtool path -d $$INI_SCANNED_PATH`; \ + $(EGREP) -h -v $(PHP_DEPRECATED_DIRECTIVES_REGEX) "$$INI_SCANNED_PATH"/*.ini >> $(top_builddir)/tmp-php.ini; \ + fi; \ + TEST_PHP_EXECUTABLE=$(PHP_EXECUTABLE) \ + TEST_PHP_SRCDIR=$(top_srcdir) \ + CC="$(CC)" \ + $(PHP_EXECUTABLE) -n -c $(top_builddir)/tmp-php.ini $(PHP_TEST_SETTINGS) $(top_srcdir)/run-tests.php -n -c $(top_builddir)/tmp-php.ini -d extension_dir=$(top_builddir)/modules/ $(PHP_TEST_SHARED_EXTENSIONS) $(TESTS); \ + TEST_RESULT_EXIT_CODE=$$?; \ + rm $(top_builddir)/tmp-php.ini; \ + exit $$TEST_RESULT_EXIT_CODE; \ + else \ + echo "ERROR: Cannot run tests without CLI sapi."; \ + fi + +clean: + find . -name \*.gcno -o -name \*.gcda | xargs rm -f + find . -name \*.lo -o -name \*.o | xargs rm -f + find . -name \*.la -o -name \*.a | xargs rm -f + find . -name \*.so | xargs rm -f + find . -name .libs -a -type d|xargs rm -rf + rm -f libphp$(PHP_MAJOR_VERSION).la $(SAPI_CLI_PATH) $(SAPI_CGI_PATH) $(SAPI_LITESPEED_PATH) $(SAPI_FPM_PATH) $(OVERALL_TARGET) modules/* libs/* + +distclean: clean + rm -f Makefile config.cache config.log config.status Makefile.objects Makefile.fragments libtool main/php_config.h main/internal_functions_cli.c main/internal_functions.c Zend/zend_dtrace_gen.h Zend/zend_dtrace_gen.h.bak Zend/zend_config.h + rm -f main/build-defs.h scripts/phpize + rm -f ext/date/lib/timelib_config.h ext/mbstring/libmbfl/config.h ext/oci8/oci8_dtrace_gen.h ext/oci8/oci8_dtrace_gen.h.bak + rm -f scripts/man1/phpize.1 scripts/php-config scripts/man1/php-config.1 sapi/cli/php.1 sapi/cgi/php-cgi.1 sapi/phpdbg/phpdbg.1 ext/phar/phar.1 ext/phar/phar.phar.1 + rm -f sapi/fpm/php-fpm.conf sapi/fpm/init.d.php-fpm sapi/fpm/php-fpm.service sapi/fpm/php-fpm.8 sapi/fpm/status.html + rm -f ext/iconv/php_have_bsd_iconv.h ext/iconv/php_have_glibc_iconv.h ext/iconv/php_have_ibm_iconv.h ext/iconv/php_have_iconv.h ext/iconv/php_have_libiconv.h ext/iconv/php_iconv_aliased_libiconv.h ext/iconv/php_iconv_supports_errno.h ext/iconv/php_php_iconv_h_path.h ext/iconv/php_php_iconv_impl.h + rm -f ext/phar/phar.phar ext/phar/phar.php + if test "$(srcdir)" != "$(builddir)"; then \ + rm -f ext/phar/phar/phar.inc; \ + fi + $(EGREP) define'.*include/php' $(top_srcdir)/configure | $(SED) 's/.*>//'|xargs rm -f + +prof-gen: + CCACHE_DISABLE=1 $(MAKE) PROF_FLAGS=-fprofile-generate all + +prof-clean: + find . -name \*.lo -o -name \*.o | xargs rm -f + find . -name \*.la -o -name \*.a | xargs rm -f + find . -name \*.so | xargs rm -f + rm -f libphp$(PHP_MAJOR_VERSION).la $(SAPI_CLI_PATH) $(SAPI_CGI_PATH) $(SAPI_LITESPEED_PATH) $(SAPI_FPM_PATH) $(OVERALL_TARGET) modules/* libs/* + +prof-use: + CCACHE_DISABLE=1 $(MAKE) PROF_FLAGS=-fprofile-use all + + +.PHONY: all clean install distclean test prof-gen prof-clean prof-use +.NOEXPORT: +ecore.lo: /home/xingzi/projects/php-7.4.30/ext/ecore/ecore.c + $(LIBTOOL) --mode=compile $(CC) -I. -I/home/xingzi/projects/php-7.4.30/ext/ecore $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) -c /home/xingzi/projects/php-7.4.30/ext/ecore/ecore.c -o ecore.lo +$(phplibdir)/ecore.la: ./ecore.la + $(LIBTOOL) --mode=install cp ./ecore.la $(phplibdir) + +./ecore.la: $(shared_objects_ecore) $(ECORE_SHARED_DEPENDENCIES) + $(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_ecore) $(ECORE_SHARED_LIBADD) + diff --git a/path.txt b/path.txt new file mode 100644 index 0000000..c460856 --- /dev/null +++ b/path.txt @@ -0,0 +1 @@ +/home/xingzi/projects/php-7.4.30/ext/ecore \ No newline at end of file diff --git a/php_ecore.h b/php_ecore.h new file mode 100644 index 0000000..6cf853d --- /dev/null +++ b/php_ecore.h @@ -0,0 +1,23 @@ +/* ecore extension for PHP */ + +#ifndef PHP_ECORE_H +# define PHP_ECORE_H + +extern zend_module_entry ecore_module_entry; +# define phpext_ecore_ptr &ecore_module_entry + +# define PHP_ECORE_VERSION "0.1.0" + +# if defined(ZTS) && defined(COMPILE_DL_ECORE) +ZEND_TSRMLS_CACHE_EXTERN() +# endif + +#endif /* PHP_ECORE_H */ + +ZEND_BEGIN_MODULE_GLOBALS(ecore) + zend_long scale; +ZEND_END_MODULE_GLOBALS(ecore) + +ZEND_EXTERN_MODULE_GLOBALS(ecore) + +#define TEST_G(v) ZEND_MODULE_GLOBALS_ACCESSOR(ecore, v) diff --git a/php_test_results_20220613_0744.txt b/php_test_results_20220613_0744.txt new file mode 100644 index 0000000..060d233 --- /dev/null +++ b/php_test_results_20220613_0744.txt @@ -0,0 +1,1001 @@ + + +===================================================================== +TEST RESULT SUMMARY +--------------------------------------------------------------------- +Exts skipped : 0 +Exts tested : 15 +--------------------------------------------------------------------- + +Number of tests : 3 3 +Tests skipped : 0 ( 0.0%) -------- +Tests warned : 0 ( 0.0%) ( 0.0%) +Tests failed : 0 ( 0.0%) ( 0.0%) +Tests passed : 3 (100.0%) (100.0%) +--------------------------------------------------------------------- +Time taken : 0 seconds +===================================================================== + + + +================================================================================ +BUILD ENVIRONMENT +================================================================================ +OS: +Linux - Linux xingzi 5.10.102.1-microsoft-standard-WSL2 #1 SMP Wed Mar 2 00:30:59 UTC 2022 x86_64 + +Autoconf: +autoconf (GNU Autoconf) 2.69 +Copyright (C) 2012 Free Software Foundation, Inc. +License GPLv3+/Autoconf: GNU GPL version 3 or later +, +This is free software: you are free to change and redistribute it. +There is NO WARRANTY, to the extent permitted by law. + +Written by David J. MacKenzie and Akim Demaille. + +Bundled Libtool: +ltmain.sh (GNU libtool) 1.5.26 (1.1220.2.492 2008/01/30 06:40:56) + +Copyright (C) 2008 Free Software Foundation, Inc. +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + +System Libtool: +N/A +Compiler: +Using built-in specs. +COLLECT_GCC=cc +COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper +OFFLOAD_TARGET_NAMES=nvptx-none:hsa +OFFLOAD_TARGET_DEFAULT=1 +Target: x86_64-linux-gnu +Configured with: ../src/configure -v --with-pkgversion='Ubuntu 9.4.0-1ubuntu1~20.04.1' --with-bugurl=file:///usr/share/doc/gcc-9/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,gm2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-9 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-9-Av3uEd/gcc-9-9.4.0/debian/tmp-nvptx/usr,hsa --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu +Thread model: posix +gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.1) + +Bison: + +Libraries: + linux-vdso.so.1 (0x00007fffea676000) + libargon2.so.1 => /lib/x86_64-linux-gnu/libargon2.so.1 (0x00007fcb7b2de000) + libresolv.so.2 => /lib/x86_64-linux-gnu/libresolv.so.2 (0x00007fcb7b2c2000) + libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fcb7b173000) + libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fcb7b16d000) + libxml2.so.2 => /lib/x86_64-linux-gnu/libxml2.so.2 (0x00007fcb7afb3000) + libssl.so.1.1 => /lib/x86_64-linux-gnu/libssl.so.1.1 (0x00007fcb7af20000) + libcrypto.so.1.1 => /lib/x86_64-linux-gnu/libcrypto.so.1.1 (0x00007fcb7ac48000) + libpcre2-8.so.0 => /lib/x86_64-linux-gnu/libpcre2-8.so.0 (0x00007fcb7abb8000) + libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007fcb7ab9c000) + libsodium.so.23 => /lib/x86_64-linux-gnu/libsodium.so.23 (0x00007fcb7ab44000) + libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fcb7a952000) + libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fcb7a92f000) + /lib64/ld-linux-x86-64.so.2 (0x00007fcb7b7a9000) + libicuuc.so.66 => /lib/x86_64-linux-gnu/libicuuc.so.66 (0x00007fcb7a747000) + liblzma.so.5 => /lib/x86_64-linux-gnu/liblzma.so.5 (0x00007fcb7a71e000) + libicudata.so.66 => /lib/x86_64-linux-gnu/libicudata.so.66 (0x00007fcb78c5d000) + libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fcb78a7b000) + libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fcb78a60000) + + + +================================================================================ +PHPINFO +================================================================================ +phpinfo() +PHP Version => 7.4.3 + +System => Linux xingzi 5.10.102.1-microsoft-standard-WSL2 #1 SMP Wed Mar 2 00:30:59 UTC 2022 x86_64 +Build Date => Mar 2 2022 15:36:52 +Server API => Command Line Interface +Virtual Directory Support => disabled +Configuration File (php.ini) Path => /etc/php/7.4/cli +Loaded Configuration File => /etc/php/7.4/cli/php.ini +Scan this dir for additional .ini files => /etc/php/7.4/cli/conf.d +Additional .ini files parsed => /etc/php/7.4/cli/conf.d/10-mysqlnd.ini, +/etc/php/7.4/cli/conf.d/10-opcache.ini, +/etc/php/7.4/cli/conf.d/10-pdo.ini, +/etc/php/7.4/cli/conf.d/15-xml.ini, +/etc/php/7.4/cli/conf.d/20-calendar.ini, +/etc/php/7.4/cli/conf.d/20-ctype.ini, +/etc/php/7.4/cli/conf.d/20-curl.ini, +/etc/php/7.4/cli/conf.d/20-dom.ini, +/etc/php/7.4/cli/conf.d/20-exif.ini, +/etc/php/7.4/cli/conf.d/20-ffi.ini, +/etc/php/7.4/cli/conf.d/20-fileinfo.ini, +/etc/php/7.4/cli/conf.d/20-ftp.ini, +/etc/php/7.4/cli/conf.d/20-gd.ini, +/etc/php/7.4/cli/conf.d/20-gettext.ini, +/etc/php/7.4/cli/conf.d/20-iconv.ini, +/etc/php/7.4/cli/conf.d/20-json.ini, +/etc/php/7.4/cli/conf.d/20-mbstring.ini, +/etc/php/7.4/cli/conf.d/20-mysqli.ini, +/etc/php/7.4/cli/conf.d/20-pdo_mysql.ini, +/etc/php/7.4/cli/conf.d/20-phar.ini, +/etc/php/7.4/cli/conf.d/20-posix.ini, +/etc/php/7.4/cli/conf.d/20-readline.ini, +/etc/php/7.4/cli/conf.d/20-shmop.ini, +/etc/php/7.4/cli/conf.d/20-simplexml.ini, +/etc/php/7.4/cli/conf.d/20-sockets.ini, +/etc/php/7.4/cli/conf.d/20-sysvmsg.ini, +/etc/php/7.4/cli/conf.d/20-sysvsem.ini, +/etc/php/7.4/cli/conf.d/20-sysvshm.ini, +/etc/php/7.4/cli/conf.d/20-tokenizer.ini, +/etc/php/7.4/cli/conf.d/20-xdebug.ini, +/etc/php/7.4/cli/conf.d/20-xmlreader.ini, +/etc/php/7.4/cli/conf.d/20-xmlwriter.ini, +/etc/php/7.4/cli/conf.d/20-xsl.ini, +/etc/php/7.4/cli/conf.d/20-zip.ini, +/etc/php/7.4/cli/conf.d/rdkafka.ini, +/etc/php/7.4/cli/conf.d/redis.ini + +PHP API => 20190902 +PHP Extension => 20190902 +Zend Extension => 320190902 +Zend Extension Build => API320190902,NTS +PHP Extension Build => API20190902,NTS +Debug Build => no +Thread Safety => disabled +Zend Signal Handling => enabled +Zend Memory Manager => enabled +Zend Multibyte Support => provided by mbstring +IPv6 Support => enabled +DTrace Support => available, disabled + +Registered PHP Streams => https, ftps, compress.zlib, php, file, glob, data, http, ftp, phar, zip +Registered Stream Socket Transports => tcp, udp, unix, udg, ssl, tls, tlsv1.0, tlsv1.1, tlsv1.2, tlsv1.3 +Registered Stream Filters => zlib.*, string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, dechunk, convert.iconv.* + +This program makes use of the Zend Scripting Language Engine: +Zend Engine v3.4.0, Copyright (c) Zend Technologies + with Zend OPcache v7.4.3, Copyright (c), by Zend Technologies + with Xdebug v2.9.2, Copyright (c) 2002-2020, by Derick Rethans + + + _______________________________________________________________________ + + +Configuration + +calendar + +Calendar support => enabled + +Core + +PHP Version => 7.4.3 + +Directive => Local Value => Master Value +allow_url_fopen => On => On +allow_url_include => Off => Off +arg_separator.input => & => & +arg_separator.output => & => & +auto_append_file => no value => no value +auto_globals_jit => On => On +auto_prepend_file => no value => no value +browscap => no value => no value +default_charset => UTF-8 => UTF-8 +default_mimetype => text/html => text/html +disable_classes => no value => no value +disable_functions => no value => no value +display_errors => STDERR => STDERR +display_startup_errors => Off => Off +doc_root => no value => no value +docref_ext => no value => no value +docref_root => no value => no value +enable_dl => Off => Off +enable_post_data_reading => On => On +error_append_string => no value => no value +error_log => no value => no value +error_prepend_string => no value => no value +error_reporting => 22527 => 22527 +expose_php => On => On +extension_dir => /usr/lib/php/20190902 => /usr/lib/php/20190902 +file_uploads => On => On +hard_timeout => 2 => 2 +highlight.comment => #FF8000 => #FF8000 +highlight.default => #0000BB => #0000BB +highlight.html => #000000 => #000000 +highlight.keyword => #007700 => #007700 +highlight.string => #DD0000 => #DD0000 +html_errors => Off => Off +ignore_repeated_errors => Off => Off +ignore_repeated_source => Off => Off +ignore_user_abort => Off => Off +implicit_flush => On => On +include_path => .:/usr/share/php => .:/usr/share/php +input_encoding => no value => no value +internal_encoding => no value => no value +log_errors => On => On +log_errors_max_len => 1024 => 1024 +mail.add_x_header => Off => Off +mail.force_extra_parameters => no value => no value +mail.log => no value => no value +max_execution_time => 0 => 0 +max_file_uploads => 20 => 20 +max_input_nesting_level => 64 => 64 +max_input_time => -1 => -1 +max_input_vars => 1000 => 1000 +memory_limit => 512M => 512M +open_basedir => no value => no value +output_buffering => 0 => 0 +output_encoding => no value => no value +output_handler => no value => no value +post_max_size => 8M => 8M +precision => 14 => 14 +realpath_cache_size => 4096K => 4096K +realpath_cache_ttl => 120 => 120 +register_argc_argv => On => On +report_memleaks => On => On +report_zend_debug => Off => Off +request_order => GP => GP +sendmail_from => no value => no value +sendmail_path => /usr/sbin/sendmail -t -i => /usr/sbin/sendmail -t -i +serialize_precision => -1 => -1 +short_open_tag => Off => Off +SMTP => localhost => localhost +smtp_port => 25 => 25 +sys_temp_dir => no value => no value +syslog.facility => LOG_USER => LOG_USER +syslog.filter => no-ctrl => no-ctrl +syslog.ident => php => php +track_errors => Off => Off +unserialize_callback_func => no value => no value +upload_max_filesize => 2M => 2M +upload_tmp_dir => no value => no value +user_dir => no value => no value +user_ini.cache_ttl => 300 => 300 +user_ini.filename => .user.ini => .user.ini +variables_order => GPCS => GPCS +xmlrpc_error_number => 0 => 0 +xmlrpc_errors => Off => Off +zend.assertions => -1 => -1 +zend.detect_unicode => On => On +zend.enable_gc => On => On +zend.exception_ignore_args => On => On +zend.multibyte => Off => Off +zend.script_encoding => no value => no value +zend.signal_check => Off => Off + +ctype + +ctype functions => enabled + +curl + +cURL support => enabled +cURL Information => 7.68.0 +Age => 5 +Features +AsynchDNS => Yes +CharConv => No +Debug => No +GSS-Negotiate => No +IDN => Yes +IPv6 => Yes +krb4 => No +Largefile => Yes +libz => Yes +NTLM => Yes +NTLMWB => Yes +SPNEGO => Yes +SSL => Yes +SSPI => No +TLS-SRP => Yes +HTTP2 => Yes +GSSAPI => Yes +KERBEROS5 => Yes +UNIX_SOCKETS => Yes +PSL => Yes +HTTPS_PROXY => Yes +MULTI_SSL => No +BROTLI => Yes +Protocols => dict, file, ftp, ftps, gopher, http, https, imap, imaps, ldap, ldaps, pop3, pop3s, rtmp, rtsp, scp, sftp, smb, smbs, smtp, smtps, telnet, tftp +Host => x86_64-pc-linux-gnu +SSL Version => OpenSSL/1.1.1f +ZLib Version => 1.2.11 +libSSH Version => libssh/0.9.3/openssl/zlib + +Directive => Local Value => Master Value +curl.cainfo => no value => no value + +date + +date/time support => enabled +timelib version => 2018.03 +"Olson" Timezone Database Version => 0.system +Timezone Database => internal +Default timezone => Asia/Chongqing + +Directive => Local Value => Master Value +date.default_latitude => 31.7667 => 31.7667 +date.default_longitude => 35.2333 => 35.2333 +date.sunrise_zenith => 90.583333 => 90.583333 +date.sunset_zenith => 90.583333 => 90.583333 +date.timezone => no value => no value + +dom + +DOM/XML => enabled +DOM/XML API Version => 20031129 +libxml Version => 2.9.10 +HTML Support => enabled +XPath Support => enabled +XPointer Support => enabled +Schema Support => enabled +RelaxNG Support => enabled + +ecore + +ecore support => enabled + +exif + +EXIF Support => enabled +Supported EXIF Version => 0220 +Supported filetypes => JPEG, TIFF +Multibyte decoding support using mbstring => enabled +Extended EXIF tag formats => Canon, Casio, Fujifilm, Nikon, Olympus, Samsung, Panasonic, DJI, Sony, Pentax, Minolta, Sigma, Foveon, Kyocera, Ricoh, AGFA, Epson + +Directive => Local Value => Master Value +exif.decode_jis_intel => JIS => JIS +exif.decode_jis_motorola => JIS => JIS +exif.decode_unicode_intel => UCS-2LE => UCS-2LE +exif.decode_unicode_motorola => UCS-2BE => UCS-2BE +exif.encode_jis => no value => no value +exif.encode_unicode => ISO-8859-15 => ISO-8859-15 + +FFI + +FFI support => enabled + +Directive => Local Value => Master Value +ffi.enable => preload => preload +ffi.preload => no value => no value + +fileinfo + +fileinfo support => enabled +libmagic => 537 + +filter + +Input Validation and Filtering => enabled + +Directive => Local Value => Master Value +filter.default => unsafe_raw => unsafe_raw +filter.default_flags => no value => no value + +ftp + +FTP support => enabled +FTPS support => enabled + +gd + +GD Support => enabled +GD headers Version => 2.2.5 +GD library Version => 2.2.5 +FreeType Support => enabled +FreeType Linkage => with freetype +GIF Read Support => enabled +GIF Create Support => enabled +JPEG Support => enabled +PNG Support => enabled +WBMP Support => enabled +XPM Support => enabled +XBM Support => enabled +WebP Support => enabled +BMP Support => enabled +TGA Read Support => enabled + +Directive => Local Value => Master Value +gd.jpeg_ignore_warning => 1 => 1 + +gettext + +GetText Support => enabled + +hash + +hash support => enabled +Hashing Engines => md2 md4 md5 sha1 sha224 sha256 sha384 sha512/224 sha512/256 sha512 sha3-224 sha3-256 sha3-384 sha3-512 ripemd128 ripemd160 ripemd256 ripemd320 whirlpool tiger128,3 tiger160,3 tiger192,3 tiger128,4 tiger160,4 tiger192,4 snefru snefru256 gost gost-crypto adler32 crc32 crc32b crc32c fnv132 fnv1a32 fnv164 fnv1a64 joaat haval128,3 haval160,3 haval192,3 haval224,3 haval256,3 haval128,4 haval160,4 haval192,4 haval224,4 haval256,4 haval128,5 haval160,5 haval192,5 haval224,5 haval256,5 + +MHASH support => Enabled +MHASH API Version => Emulated Support + +iconv + +iconv support => enabled +iconv implementation => glibc +iconv library version => 2.31 + +Directive => Local Value => Master Value +iconv.input_encoding => no value => no value +iconv.internal_encoding => no value => no value +iconv.output_encoding => no value => no value + +json + +json support => enabled + +libxml + +libXML support => active +libXML Compiled Version => 2.9.10 +libXML Loaded Version => 20910 +libXML streams => enabled + +mbstring + +Multibyte Support => enabled +Multibyte string engine => libmbfl +HTTP input encoding translation => disabled +libmbfl version => 1.3.2 + +mbstring extension makes use of "streamable kanji code filter and converter", which is distributed under the GNU Lesser General Public License version 2.1. + +Multibyte (japanese) regex support => enabled +Multibyte regex (oniguruma) version => 6.9.4 + +Directive => Local Value => Master Value +mbstring.detect_order => no value => no value +mbstring.encoding_translation => Off => Off +mbstring.func_overload => 0 => 0 +mbstring.http_input => no value => no value +mbstring.http_output => no value => no value +mbstring.http_output_conv_mimetypes => ^(text/|application/xhtml\+xml) => ^(text/|application/xhtml\+xml) +mbstring.internal_encoding => no value => no value +mbstring.language => neutral => neutral +mbstring.regex_retry_limit => 1000000 => 1000000 +mbstring.regex_stack_limit => 100000 => 100000 +mbstring.strict_detection => Off => Off +mbstring.substitute_character => no value => no value + +mysqli + +MysqlI Support => enabled +Client API library version => mysqlnd 7.4.3 +Active Persistent Links => 0 +Inactive Persistent Links => 0 +Active Links => 0 + +Directive => Local Value => Master Value +mysqli.allow_local_infile => Off => Off +mysqli.allow_persistent => On => On +mysqli.default_host => no value => no value +mysqli.default_port => 3306 => 3306 +mysqli.default_pw => no value => no value +mysqli.default_socket => no value => no value +mysqli.default_user => no value => no value +mysqli.max_links => Unlimited => Unlimited +mysqli.max_persistent => Unlimited => Unlimited +mysqli.reconnect => Off => Off +mysqli.rollback_on_cached_plink => Off => Off + +mysqlnd + +mysqlnd => enabled +Version => mysqlnd 7.4.3 +Compression => supported +core SSL => supported +extended SSL => supported +Command buffer size => 4096 +Read buffer size => 32768 +Read timeout => 86400 +Collecting statistics => Yes +Collecting memory statistics => No +Tracing => n/a +Loaded plugins => mysqlnd,debug_trace,auth_plugin_mysql_native_password,auth_plugin_mysql_clear_password,auth_plugin_caching_sha2_password,auth_plugin_sha256_password +API Extensions => mysqli,pdo_mysql + +openssl + +OpenSSL support => enabled +OpenSSL Library Version => OpenSSL 1.1.1f 31 Mar 2020 +OpenSSL Header Version => OpenSSL 1.1.1f 31 Mar 2020 +Openssl default config => /usr/lib/ssl/openssl.cnf + +Directive => Local Value => Master Value +openssl.cafile => no value => no value +openssl.capath => no value => no value + +pcntl + +pcntl support => enabled + +pcre + +PCRE (Perl Compatible Regular Expressions) Support => enabled +PCRE Library Version => 10.34 2019-11-21 +PCRE Unicode Version => 12.1.0 +PCRE JIT Support => enabled +PCRE JIT Target => x86 64bit (little endian + unaligned) + +Directive => Local Value => Master Value +pcre.backtrack_limit => 1000000 => 1000000 +pcre.jit => 1 => 1 +pcre.recursion_limit => 100000 => 100000 + +PDO + +PDO support => enabled +PDO drivers => mysql + +pdo_mysql + +PDO Driver for MySQL => enabled +Client API version => mysqlnd 7.4.3 + +Directive => Local Value => Master Value +pdo_mysql.default_socket => /var/run/mysqld/mysqld.sock => /var/run/mysqld/mysqld.sock + +Phar + +Phar: PHP Archive support => enabled +Phar API version => 1.1.1 +Phar-based phar archives => enabled +Tar-based phar archives => enabled +ZIP-based phar archives => enabled +gzip compression => enabled +bzip2 compression => disabled (install ext/bz2) +Native OpenSSL support => enabled + + +Phar based on pear/PHP_Archive, original concept by Davey Shafik. +Phar fully realized by Gregory Beaver and Marcus Boerger. +Portions of tar implementation Copyright (c) 2003-2009 Tim Kientzle. +Directive => Local Value => Master Value +phar.cache_list => no value => no value +phar.readonly => On => On +phar.require_hash => On => On + +posix + +POSIX support => enabled + +rdkafka + +rdkafka support => enabled +version => 6.0.1 +build date => May 30 2022 08:35:17 +librdkafka version (runtime) => 1.2.1 +librdkafka version (build) => 1.2.1.255 + +readline + +Readline Support => enabled +Readline library => EditLine wrapper + +Directive => Local Value => Master Value +cli.pager => no value => no value +cli.prompt => \b \> => \b \> + +redis + +Redis Support => enabled +Redis Version => 5.3.7 +Redis Sentinel Version => 0.1 +Available serializers => php, json + +Directive => Local Value => Master Value +redis.arrays.algorithm => no value => no value +redis.arrays.auth => no value => no value +redis.arrays.autorehash => 0 => 0 +redis.arrays.connecttimeout => 0 => 0 +redis.arrays.consistent => 0 => 0 +redis.arrays.distributor => no value => no value +redis.arrays.functions => no value => no value +redis.arrays.hosts => no value => no value +redis.arrays.index => 0 => 0 +redis.arrays.lazyconnect => 0 => 0 +redis.arrays.names => no value => no value +redis.arrays.pconnect => 0 => 0 +redis.arrays.previous => no value => no value +redis.arrays.readtimeout => 0 => 0 +redis.arrays.retryinterval => 0 => 0 +redis.clusters.auth => no value => no value +redis.clusters.cache_slots => 0 => 0 +redis.clusters.persistent => 0 => 0 +redis.clusters.read_timeout => 0 => 0 +redis.clusters.seeds => no value => no value +redis.clusters.timeout => 0 => 0 +redis.pconnect.connection_limit => 0 => 0 +redis.pconnect.echo_check_liveness => 1 => 1 +redis.pconnect.pool_detect_dirty => 0 => 0 +redis.pconnect.pool_pattern => no value => no value +redis.pconnect.pool_poll_timeout => 0 => 0 +redis.pconnect.pooling_enabled => 1 => 1 +redis.session.lock_expire => 0 => 0 +redis.session.lock_retries => 10 => 10 +redis.session.lock_wait_time => 2000 => 2000 +redis.session.locking_enabled => 0 => 0 + +Reflection + +Reflection => enabled + +session + +Session Support => enabled +Registered save handlers => files user redis rediscluster +Registered serializer handlers => php_serialize php php_binary + +Directive => Local Value => Master Value +session.auto_start => Off => Off +session.cache_expire => 180 => 180 +session.cache_limiter => nocache => nocache +session.cookie_domain => no value => no value +session.cookie_httponly => no value => no value +session.cookie_lifetime => 0 => 0 +session.cookie_path => / => / +session.cookie_samesite => no value => no value +session.cookie_secure => 0 => 0 +session.gc_divisor => 1000 => 1000 +session.gc_maxlifetime => 1440 => 1440 +session.gc_probability => 0 => 0 +session.lazy_write => On => On +session.name => PHPSESSID => PHPSESSID +session.referer_check => no value => no value +session.save_handler => files => files +session.save_path => /var/lib/php/sessions => /var/lib/php/sessions +session.serialize_handler => php => php +session.sid_bits_per_character => 5 => 5 +session.sid_length => 26 => 26 +session.upload_progress.cleanup => On => On +session.upload_progress.enabled => On => On +session.upload_progress.freq => 1% => 1% +session.upload_progress.min_freq => 1 => 1 +session.upload_progress.name => PHP_SESSION_UPLOAD_PROGRESS => PHP_SESSION_UPLOAD_PROGRESS +session.upload_progress.prefix => upload_progress_ => upload_progress_ +session.use_cookies => 1 => 1 +session.use_only_cookies => 1 => 1 +session.use_strict_mode => 0 => 0 +session.use_trans_sid => 0 => 0 + +shmop + +shmop support => enabled + +SimpleXML + +SimpleXML support => enabled +Schema support => enabled + +sockets + +Sockets Support => enabled + +sodium + +sodium support => enabled +libsodium headers version => 1.0.18 +libsodium library version => 1.0.18 + +SPL + +SPL support => enabled +Interfaces => OuterIterator, RecursiveIterator, SeekableIterator, SplObserver, SplSubject +Classes => AppendIterator, ArrayIterator, ArrayObject, BadFunctionCallException, BadMethodCallException, CachingIterator, CallbackFilterIterator, DirectoryIterator, DomainException, EmptyIterator, FilesystemIterator, FilterIterator, GlobIterator, InfiniteIterator, InvalidArgumentException, IteratorIterator, LengthException, LimitIterator, LogicException, MultipleIterator, NoRewindIterator, OutOfBoundsException, OutOfRangeException, OverflowException, ParentIterator, RangeException, RecursiveArrayIterator, RecursiveCachingIterator, RecursiveCallbackFilterIterator, RecursiveDirectoryIterator, RecursiveFilterIterator, RecursiveIteratorIterator, RecursiveRegexIterator, RecursiveTreeIterator, RegexIterator, RuntimeException, SplDoublyLinkedList, SplFileInfo, SplFileObject, SplFixedArray, SplHeap, SplMinHeap, SplMaxHeap, SplObjectStorage, SplPriorityQueue, SplQueue, SplStack, SplTempFileObject, UnderflowException, UnexpectedValueException + +standard + +Dynamic Library Support => enabled +Path to sendmail => /usr/sbin/sendmail -t -i + +Directive => Local Value => Master Value +assert.active => 1 => 1 +assert.bail => 0 => 0 +assert.callback => no value => no value +assert.exception => 0 => 0 +assert.quiet_eval => 0 => 0 +assert.warning => 1 => 1 +auto_detect_line_endings => 0 => 0 +default_socket_timeout => 60 => 60 +from => no value => no value +session.trans_sid_hosts => no value => no value +session.trans_sid_tags => a=href,area=href,frame=src,form= => a=href,area=href,frame=src,form= +unserialize_max_depth => 4096 => 4096 +url_rewriter.hosts => no value => no value +url_rewriter.tags => form= => form= +user_agent => no value => no value + +sysvmsg + +sysvmsg support => enabled + +sysvsem + +sysvsem support => enabled + +sysvshm + +sysvshm support => enabled + +tokenizer + +Tokenizer Support => enabled + +xdebug + +xdebug support => enabled +Version => 2.9.2 +Support Xdebug on Patreon, GitHub, or as a business: https://xdebug.org/support + +Debugger => enabled +IDE Key => xingzi + +Directive => Local Value => Master Value +xdebug.auto_trace => Off => Off +xdebug.cli_color => 0 => 0 +xdebug.collect_assignments => Off => Off +xdebug.collect_includes => On => On +xdebug.collect_params => 0 => 0 +xdebug.collect_return => Off => Off +xdebug.collect_vars => Off => Off +xdebug.coverage_enable => On => On +xdebug.default_enable => On => On +xdebug.dump.COOKIE => no value => no value +xdebug.dump.ENV => no value => no value +xdebug.dump.FILES => no value => no value +xdebug.dump.GET => no value => no value +xdebug.dump.POST => no value => no value +xdebug.dump.REQUEST => no value => no value +xdebug.dump.SERVER => no value => no value +xdebug.dump.SESSION => no value => no value +xdebug.dump_globals => On => On +xdebug.dump_once => On => On +xdebug.dump_undefined => Off => Off +xdebug.file_link_format => no value => no value +xdebug.filename_format => no value => no value +xdebug.force_display_errors => Off => Off +xdebug.force_error_reporting => 0 => 0 +xdebug.gc_stats_enable => Off => Off +xdebug.gc_stats_output_dir => /tmp => /tmp +xdebug.gc_stats_output_name => gcstats.%p => gcstats.%p +xdebug.halt_level => 0 => 0 +xdebug.idekey => no value => no value +xdebug.max_nesting_level => 512 => 512 +xdebug.max_stack_frames => -1 => -1 +xdebug.overload_var_dump => 2 => 2 +xdebug.profiler_append => Off => Off +xdebug.profiler_enable => Off => Off +xdebug.profiler_enable_trigger => Off => Off +xdebug.profiler_enable_trigger_value => no value => no value +xdebug.profiler_output_dir => /tmp => /tmp +xdebug.profiler_output_name => cachegrind.out.%p => cachegrind.out.%p +xdebug.remote_addr_header => no value => no value +xdebug.remote_autostart => On => On +xdebug.remote_connect_back => Off => Off +xdebug.remote_cookie_expire_time => 3600 => 3600 +xdebug.remote_enable => On => On +xdebug.remote_host => 127.0.0.1 => 127.0.0.1 +xdebug.remote_log => no value => no value +xdebug.remote_log_level => 7 => 7 +xdebug.remote_mode => req => req +xdebug.remote_port => 9003 => 9003 +xdebug.remote_timeout => 200 => 200 +xdebug.scream => Off => Off +xdebug.show_error_trace => Off => Off +xdebug.show_exception_trace => Off => Off +xdebug.show_local_vars => Off => Off +xdebug.show_mem_delta => Off => Off +xdebug.trace_enable_trigger => Off => Off +xdebug.trace_enable_trigger_value => no value => no value +xdebug.trace_format => 0 => 0 +xdebug.trace_options => 0 => 0 +xdebug.trace_output_dir => /tmp => /tmp +xdebug.trace_output_name => trace.%c => trace.%c +xdebug.var_display_max_children => -1 => -1 +xdebug.var_display_max_data => -1 => -1 +xdebug.var_display_max_depth => -1 => -1 + +xml + +XML Support => active +XML Namespace Support => active +libxml2 Version => 2.9.10 + +xmlreader + +XMLReader => enabled + +xmlwriter + +XMLWriter => enabled + +xsl + +XSL => enabled +libxslt Version => 1.1.34 +libxslt compiled against libxml Version => 2.9.10 +EXSLT => enabled +libexslt Version => 1.1.34 + +Zend OPcache + +Opcode Caching => Disabled +Optimization => Disabled +SHM Cache => Enabled +File Cache => Disabled +Startup Failed => Opcode Caching is disabled for CLI + +Directive => Local Value => Master Value +opcache.blacklist_filename => no value => no value +opcache.consistency_checks => 0 => 0 +opcache.dups_fix => Off => Off +opcache.enable => On => On +opcache.enable_cli => Off => Off +opcache.enable_file_override => Off => Off +opcache.error_log => no value => no value +opcache.file_cache => no value => no value +opcache.file_cache_consistency_checks => 1 => 1 +opcache.file_cache_only => 0 => 0 +opcache.file_update_protection => 2 => 2 +opcache.force_restart_timeout => 180 => 180 +opcache.huge_code_pages => Off => Off +opcache.interned_strings_buffer => 8 => 8 +opcache.lockfile_path => /tmp => /tmp +opcache.log_verbosity_level => 1 => 1 +opcache.max_accelerated_files => 10000 => 10000 +opcache.max_file_size => 0 => 0 +opcache.max_wasted_percentage => 5 => 5 +opcache.memory_consumption => 128 => 128 +opcache.opt_debug_level => 0 => 0 +opcache.optimization_level => 0 => 0x7FFEBFFF +opcache.preferred_memory_model => no value => no value +opcache.preload => no value => no value +opcache.preload_user => no value => no value +opcache.protect_memory => 0 => 0 +opcache.restrict_api => no value => no value +opcache.revalidate_freq => 2 => 2 +opcache.revalidate_path => Off => Off +opcache.save_comments => 1 => 1 +opcache.use_cwd => On => On +opcache.validate_permission => Off => Off +opcache.validate_root => Off => Off +opcache.validate_timestamps => On => On + +zip + +Zip => enabled +Zip version => 1.15.6 +Libzip headers version => 1.5.1 +Libzip library version => 1.5.1 + +zlib + +ZLib Support => enabled +Stream Wrapper => compress.zlib:// +Stream Filter => zlib.inflate, zlib.deflate +Compiled Version => 1.2.11 +Linked Version => 1.2.11 + +Directive => Local Value => Master Value +zlib.output_compression => Off => Off +zlib.output_compression_level => -1 => -1 +zlib.output_handler => no value => no value + +Additional Modules + +Module Name + +Environment + +Variable => Value +LESSOPEN => | /usr/bin/lesspipe %s +USER => xingzi +SSH_CLIENT => deleted +GIT_ASKPASS => /home/xingzi/.vscode-server/bin/4af164ea3a06f701fe3e89a2bcbb421d2026b68f/extensions/git/dist/askpass.sh +SHLVL => 2 +TEST_PHP_SRCDIR => /home/xingzi/projects/php-7.4.30/ext/ecore +HOME => /home/xingzi +TERM_PROGRAM_VERSION => 1.68.0 +VSCODE_IPC_HOOK_CLI => /mnt/wslg/runtime-dir/vscode-ipc-5ea7dfbe-8653-4002-944d-3438a107b274.sock +SSH_TTY => deleted +VSCODE_GIT_ASKPASS_MAIN => /home/xingzi/.vscode-server/bin/4af164ea3a06f701fe3e89a2bcbb421d2026b68f/extensions/git/dist/askpass-main.js +VSCODE_GIT_ASKPASS_NODE => /home/xingzi/.vscode-server/bin/4af164ea3a06f701fe3e89a2bcbb421d2026b68f/node +MAKEFLAGS => +COLORTERM => truecolor +WSL_DISTRO_NAME => Ubuntu +MAKE_TERMERR => /dev/pts/1 +WAYLAND_DISPLAY => wayland-0 +LOGNAME => xingzi +TEST_PHP_EXECUTABLE => /usr/bin/php7.4 +NAME => xingzi +WSL_INTEROP => /run/WSL/11_interop +PULSE_SERVER => /mnt/wslg/PulseServer +_ => /usr/bin/php7.4 +TERM => xterm-256color +PATH => /home/xingzi/.vscode-server/bin/4af164ea3a06f701fe3e89a2bcbb421d2026b68f/bin/remote-cli:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/lib/wsl/lib:/mnt/c/Program Files (x86)/VMware/VMware Workstation/bin/:/mnt/c/Windows/system32:/mnt/c/Windows:/mnt/c/Windows/System32/Wbem:/mnt/c/Windows/System32/WindowsPowerShell/v1.0/:/mnt/c/Windows/System32/OpenSSH/:/mnt/c/Program Files (x86)/NetSarang/Xftp 7/:/mnt/c/Program Files (x86)/NetSarang/Xshell 7/:/mnt/c/Program Files/Git/cmd:/mnt/c/Program Files (x86)/Tencent/微信web开发者工具/dll:/mnt/c/Program Files (x86)/NVIDIA Corporation/PhysX/Common:/mnt/c/Program Files/NVIDIA Corporation/NVIDIA NvDLISR:/mnt/c/Users/fengy/AppData/Local/Microsoft/WindowsApps:/mnt/c/Users/fengy/AppData/Local/Programs/Microsoft VS Code/bin:/mnt/c/Program Files/Java/jdk-17.0.2/bin:/mnt/d/Program/apache-jmeter-5.4.3/bin:/snap/bin +MAKELEVEL => 1 +XDG_RUNTIME_DIR => /mnt/wslg/runtime-dir +DISPLAY => :0 +LANG => C.UTF-8 +LS_COLORS => rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36: +VSCODE_GIT_IPC_HANDLE => /mnt/wslg/runtime-dir/vscode-git-1c4ecd6e3a.sock +TERM_PROGRAM => vscode +SSH_AUTH_SOCK => deleted +SHELL => /bin/bash +MAKE_TERMOUT => /dev/pts/1 +LESSCLOSE => /usr/bin/lesspipe %s %s +VSCODE_GIT_ASKPASS_EXTRA_ARGS => +PWD => /home/xingzi/projects/php-7.4.30/ext/ecore +XDG_DATA_DIRS => /usr/local/share:/usr/share:/var/lib/snapd/desktop +SSH_CONNECTION => deleted +CC => cc +MFLAGS => +HOSTTYPE => x86_64 +WSLENV => VSCODE_WSL_EXT_LOCATION/up + +PHP Variables + +Variable => Value +$_SERVER['LESSOPEN'] => | /usr/bin/lesspipe %s +$_SERVER['USER'] => xingzi +$_SERVER['SSH_CLIENT'] => deleted +$_SERVER['GIT_ASKPASS'] => /home/xingzi/.vscode-server/bin/4af164ea3a06f701fe3e89a2bcbb421d2026b68f/extensions/git/dist/askpass.sh +$_SERVER['SHLVL'] => 2 +$_SERVER['TEST_PHP_SRCDIR'] => /home/xingzi/projects/php-7.4.30/ext/ecore +$_SERVER['HOME'] => /home/xingzi +$_SERVER['TERM_PROGRAM_VERSION'] => 1.68.0 +$_SERVER['VSCODE_IPC_HOOK_CLI'] => /mnt/wslg/runtime-dir/vscode-ipc-5ea7dfbe-8653-4002-944d-3438a107b274.sock +$_SERVER['SSH_TTY'] => deleted +$_SERVER['VSCODE_GIT_ASKPASS_MAIN'] => /home/xingzi/.vscode-server/bin/4af164ea3a06f701fe3e89a2bcbb421d2026b68f/extensions/git/dist/askpass-main.js +$_SERVER['VSCODE_GIT_ASKPASS_NODE'] => /home/xingzi/.vscode-server/bin/4af164ea3a06f701fe3e89a2bcbb421d2026b68f/node +$_SERVER['MAKEFLAGS'] => +$_SERVER['COLORTERM'] => truecolor +$_SERVER['WSL_DISTRO_NAME'] => Ubuntu +$_SERVER['MAKE_TERMERR'] => /dev/pts/1 +$_SERVER['WAYLAND_DISPLAY'] => wayland-0 +$_SERVER['LOGNAME'] => xingzi +$_SERVER['TEST_PHP_EXECUTABLE'] => /usr/bin/php7.4 +$_SERVER['NAME'] => xingzi +$_SERVER['WSL_INTEROP'] => /run/WSL/11_interop +$_SERVER['PULSE_SERVER'] => /mnt/wslg/PulseServer +$_SERVER['_'] => /usr/bin/php7.4 +$_SERVER['TERM'] => xterm-256color +$_SERVER['PATH'] => /home/xingzi/.vscode-server/bin/4af164ea3a06f701fe3e89a2bcbb421d2026b68f/bin/remote-cli:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/lib/wsl/lib:/mnt/c/Program Files (x86)/VMware/VMware Workstation/bin/:/mnt/c/Windows/system32:/mnt/c/Windows:/mnt/c/Windows/System32/Wbem:/mnt/c/Windows/System32/WindowsPowerShell/v1.0/:/mnt/c/Windows/System32/OpenSSH/:/mnt/c/Program Files (x86)/NetSarang/Xftp 7/:/mnt/c/Program Files (x86)/NetSarang/Xshell 7/:/mnt/c/Program Files/Git/cmd:/mnt/c/Program Files (x86)/Tencent/微信web开发者工具/dll:/mnt/c/Program Files (x86)/NVIDIA Corporation/PhysX/Common:/mnt/c/Program Files/NVIDIA Corporation/NVIDIA NvDLISR:/mnt/c/Users/fengy/AppData/Local/Microsoft/WindowsApps:/mnt/c/Users/fengy/AppData/Local/Programs/Microsoft VS Code/bin:/mnt/c/Program Files/Java/jdk-17.0.2/bin:/mnt/d/Program/apache-jmeter-5.4.3/bin:/snap/bin +$_SERVER['MAKELEVEL'] => 1 +$_SERVER['XDG_RUNTIME_DIR'] => /mnt/wslg/runtime-dir +$_SERVER['DISPLAY'] => :0 +$_SERVER['LANG'] => C.UTF-8 +$_SERVER['LS_COLORS'] => rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36: +$_SERVER['VSCODE_GIT_IPC_HANDLE'] => /mnt/wslg/runtime-dir/vscode-git-1c4ecd6e3a.sock +$_SERVER['TERM_PROGRAM'] => vscode +$_SERVER['SSH_AUTH_SOCK'] => deleted +$_SERVER['SHELL'] => /bin/bash +$_SERVER['MAKE_TERMOUT'] => /dev/pts/1 +$_SERVER['LESSCLOSE'] => /usr/bin/lesspipe %s %s +$_SERVER['VSCODE_GIT_ASKPASS_EXTRA_ARGS'] => +$_SERVER['PWD'] => /home/xingzi/projects/php-7.4.30/ext/ecore +$_SERVER['XDG_DATA_DIRS'] => /usr/local/share:/usr/share:/var/lib/snapd/desktop +$_SERVER['SSH_CONNECTION'] => deleted +$_SERVER['CC'] => cc +$_SERVER['MFLAGS'] => +$_SERVER['HOSTTYPE'] => x86_64 +$_SERVER['WSLENV'] => VSCODE_WSL_EXT_LOCATION/up +$_SERVER['PHP_SELF'] => +$_SERVER['SCRIPT_NAME'] => +$_SERVER['SCRIPT_FILENAME'] => +$_SERVER['PATH_TRANSLATED'] => +$_SERVER['DOCUMENT_ROOT'] => +$_SERVER['REQUEST_TIME_FLOAT'] => 1655106245.8913 +$_SERVER['REQUEST_TIME'] => 1655106245 +$_SERVER['argv'] => Array +( +) + +$_SERVER['argc'] => 0 + +PHP License +This program is free software; you can redistribute it and/or modify +it under the terms of the PHP License as published by the PHP Group +and included in the distribution in the file: LICENSE + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + +If you did not receive a copy of the PHP license, or have any +questions about PHP licensing, please contact license@php.net. diff --git a/runtime/auth b/runtime/auth new file mode 100644 index 0000000..ba043df --- /dev/null +++ b/runtime/auth @@ -0,0 +1,2 @@ +https://ems.vr.lnkj0.com/ +fbce014409d4b68c0193a0c6115ccfe7 \ No newline at end of file diff --git a/test.php b/test.php new file mode 100755 index 0000000..c11ed42 --- /dev/null +++ b/test.php @@ -0,0 +1,11 @@ +#!/bin/php + "king", "age" => "18"]); + +echo PHP_EOL; +echo 'zend_bailout test' . PHP_EOL; diff --git a/tests/001.phpt b/tests/001.phpt new file mode 100644 index 0000000..f49f82b --- /dev/null +++ b/tests/001.phpt @@ -0,0 +1,14 @@ +--TEST-- +Check if ecore is loaded +--SKIPIF-- + +--FILE-- + +--EXPECT-- +The extension "ecore" is available diff --git a/tests/002.phpt b/tests/002.phpt new file mode 100644 index 0000000..f7d6775 --- /dev/null +++ b/tests/002.phpt @@ -0,0 +1,17 @@ +--TEST-- +ecore_test1() Basic test +--SKIPIF-- + +--FILE-- + +--EXPECT-- +The extension ecore is loaded and working! +NULL diff --git a/tests/003.phpt b/tests/003.phpt new file mode 100644 index 0000000..b630207 --- /dev/null +++ b/tests/003.phpt @@ -0,0 +1,16 @@ +--TEST-- +ecore_test2() Basic test +--SKIPIF-- + +--FILE-- + +--EXPECT-- +string(11) "Hello World" +string(9) "Hello PHP"