💗 C++ wrapper for Zend API

Related tags

API phpx
Overview

PHP-X

Build Status License

C++ wrapper for Zend API

PHP-X

Requirements

  • PHP 7.2 or later
  • Linux/MacOS/Windows
  • GCC 4.8 or later
  • Composer

Build phpx (bin)

./build.sh
sudo cp bin/phpx /usr/local/bin

Build libphpx.so

cmake .
make -j 4
sudo make install

Create Project

phpx create cpp_ext

Generate ArgInfo & Function Entires

php script/gen_stub.php your_stub_dir

Build extension

cd examples/cpp_ext
phpx build -v
sudo phpx install 

Load your extension

Edit php.ini, add extension=cpp_ext.so

Run

php echo.php
Comments
  • 添加扩展配置到.ini文件时产生了警告

    添加扩展配置到.ini文件时产生了警告

    根据 https://segmentfault.com/a/1190000011111074?from=timeline&isappinstalled=0 操作

    当把 extension=test.so 加到 php.ini 文件时,提示

    PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/20160303/test.so' - /usr/local/lib/libphpx.so: undefined symbol: json_globals in Unknown on line 0
    

    当加 extension=json.so 在 test.so 上一行却提示

    PHP Warning:  Module 'json' already loaded in Unknown on line 0
    
    question 
    opened by Hanson 4
  • ArchLinux 上安装, libphpx.so 拷贝位置错误

    ArchLinux 上安装, libphpx.so 拷贝位置错误

    在 ArchLinux 上执行:

    bruce@Arch ~/s/PHP-X> sudo make install
    [100%] Built target phpx
    Install the project...
    -- Install configuration: "Release"
    Are you run command using root user?
    -- Up-to-date: /usr/local/lib/libphpx.so
    -- Up-to-date: /usr/local/include/phpx.h
    -- Up-to-date: /usr/local/include/phpx_embed.h
    

    拷贝的目标地址是 /usr/local/lib/libphpx.so 设置好 php.ini 后,执行 php -m,报警告信息:

    PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/cpp_ext.so' - libphpx.so: cannot open shared object file: No such file or directory in Unknown on line 0
    

    执行:

    sudo cp /usr/local/lib/libphpx.so /usr/lib/
    

    即可解决。

    question 
    opened by ipengxh 4
  • PHP 7.28编译make -j报错

    PHP 7.28编译make -j报错

    [root@dairh phpx-0.0.2]# make -j [ 12%] Building CXX object CMakeFiles/phpx.dir/src/array.cc.o [ 25%] Building CXX object CMakeFiles/phpx.dir/src/base.cc.o [ 37%] Building CXX object CMakeFiles/phpx.dir/src/class.cc.o [ 50%] Building CXX object CMakeFiles/phpx.dir/src/extension.cc.o [ 62%] Building CXX object CMakeFiles/phpx.dir/src/hash.cc.o [ 75%] Building CXX object CMakeFiles/phpx.dir/src/string.cc.o [ 87%] Building CXX object CMakeFiles/phpx.dir/src/variant.cc.o In file included from /root/phpx-0.0.2/src/extension.cc:17:0: /root/phpx-0.0.2/include/phpx.h:21:17: 致命错误:php.h:没有那个文件或目录 #include "php.h" ^ 编译中断。 In file included from /root/phpx-0.0.2/src/array.cc:17:0: /root/phpx-0.0.2/include/phpx.h:21:17: 致命错误:php.h:没有那个文件或目录 #include "php.h" ^ 编译中断。 In file included from /root/phpx-0.0.2/src/string.cc:17:0: /root/phpx-0.0.2/include/phpx.h:21:17: 致命错误:php.h:没有那个文件或目录 #include "php.h" ^ 编译中断。 In file included from /root/phpx-0.0.2/src/class.cc:17:0: /root/phpx-0.0.2/include/phpx.h:21:17: 致命错误:php.h:没有那个文件或目录 #include "php.h" ^ 编译中断。 make[2]: *** [CMakeFiles/phpx.dir/src/class.cc.o] 错误 1 make[2]: *** 正在等待未完成的任务.... In file included from /root/phpx-0.0.2/src/hash.cc:17:0: /root/phpx-0.0.2/include/phpx.h:21:17: 致命错误:php.h:没有那个文件或目录 #include "php.h" ^ 编译中断。 In file included from /root/phpx-0.0.2/src/variant.cc:17:0: /root/phpx-0.0.2/include/phpx.h:21:17: 致命错误:php.h:没有那个文件或目录 #include "php.h" ^ 编译中断。 make[2]: *** [CMakeFiles/phpx.dir/src/variant.cc.o] 错误 1 In file included from /root/phpx-0.0.2/src/base.cc:17:0: /root/phpx-0.0.2/include/phpx.h:21:17: 致命错误:php.h:没有那个文件或目录 #include "php.h" ^ 编译中断。 make[2]: *** [CMakeFiles/phpx.dir/src/base.cc.o] 错误 1 make[2]: *** [CMakeFiles/phpx.dir/src/extension.cc.o] 错误 1 make[2]: *** [CMakeFiles/phpx.dir/src/string.cc.o] 错误 1 make[2]: *** [CMakeFiles/phpx.dir/src/array.cc.o] 错误 1 make[2]: *** [CMakeFiles/phpx.dir/src/hash.cc.o] 错误 1 make[1]: *** [CMakeFiles/phpx.dir/all] 错误 2 make: *** [all] 错误 2

    opened by daironghua521 3
  • undefined symbol: json_globals in Unknown on line 0

    undefined symbol: json_globals in Unknown on line 0

    input

    php -v
    

    got

    PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/php7.1/lib/php/extensions/no-debug-zts-20160303/cpp_ext.so' - /usr/local/lib/libphpx.so: undefined symbol: json_globals in Unknown on line 0
    PHP 7.1.12 (cli) (built: Nov 29 2017 15:48:46) ( ZTS )
    Copyright (c) 1997-2017 The PHP Group
    Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies
    
    opened by pigLoveRabbit520 3
  • PHPX +swoole_zookeeper 无法使用

    PHPX +swoole_zookeeper 无法使用

    大神您好 编译安装新版phpx后,再重新编译 swoole_zookeeper 在查看 PHP 信息时报错,无法使用

    php -v php: malloc.c:2401: sysmalloc: Assertion `(old_top == initial_top (av) && old_size == 0) || ((unsigned long) (old_size) >= MINSIZE && prev_inuse (old_top) && ((unsigned long) old_end & (pagesize - 1)) == 0)' failed.

    去掉 swoole_zookeeper 扩展后才能正常

    opened by bobyang007 2
  • macOS 10.13 Symbol not found

    macOS 10.13 Symbol not found

    wenchao @ MacBook-Pro in ~/PHP-X/examples/embed on git:master x

    ➜ make c++ -DHAVE_CONFIG_H -g -o embed -O0 embed.cc -fPIC -std=c++11 php-config --includes -Iphp-config --include-dir
    php-config --ldflags php-config --libs -lphpx -lphp7 In file included from embed.cc:17: In file included from ./phpx_embed.h:23: In file included from ./sapi/embed/php_embed.h:23: In file included from /usr/local/Cellar/php70/7.0.25_17/include/php/main/php.h:35: In file included from /usr/local/Cellar/php70/7.0.25_17/include/php/Zend/zend.h:35: /usr/local/Cellar/php70/7.0.25_17/include/php/Zend/zend_string.h:326:2: warning: 'register' storage class specifier is deprecated and incompatible with C++1z [-Wdeprecated-register] register zend_ulong hash = Z_UL(5381); ^~~~~~~~~ In file included from embed.cc:17: In file included from ./phpx_embed.h:23: In file included from ./sapi/embed/php_embed.h:23: In file included from /usr/local/Cellar/php70/7.0.25_17/include/php/main/php.h:35: In file included from /usr/local/Cellar/php70/7.0.25_17/include/php/Zend/zend.h:36: /usr/local/Cellar/php70/7.0.25_17/include/php/Zend/zend_hash.h:251:2: warning: 'register' storage class specifier is deprecated and incompatible with C++1z [-Wdeprecated-register] register const char *tmp = key; ^~~~~~~~~ In file included from embed.cc:17: In file included from ./phpx_embed.h:23: In file included from ./sapi/embed/php_embed.h:23: In file included from /usr/local/Cellar/php70/7.0.25_17/include/php/main/php.h:35: In file included from /usr/local/Cellar/php70/7.0.25_17/include/php/Zend/zend.h:342: /usr/local/Cellar/php70/7.0.25_17/include/php/Zend/zend_operators.h:188:2: warning: 'register' storage class specifier is deprecated and incompatible with C++1z [-Wdeprecated-register] register const unsigned char *e; ^~~~~~~~~ 3 warnings generated.

    wenchao @ MacBook-Pro in ~/PHP-X/examples/embed on git:master x

    ➜ ./embed dyld: Symbol not found: _basic_globals Referenced from: /usr/local/lib/libphpx.dylib Expected in: flat namespace in /usr/local/lib/libphpx.dylib [1] 47273 abort ./embed

    opened by zhang-wenchao 2
  • 完善variant,array的拷贝语义

    完善variant,array的拷贝语义

    对Variant和Array改动较多,这是一个可用的版本(在我的业务里可以正常工作),需要一起看看。

    1,主要是增加了Variant的拷贝构造,完善了原先的拷贝赋值,删除了在Variant构造函数之外的addRef调用。 2,现在的Variant拷贝应该是对zval的生命延续,而产生Variant副本则应该通过dup函数创建。 3,Array是支持数组操作的Variant,但是其拷贝构造函数额外的考虑了Array(retval)的用法,也就是Variant如果是zend函数返回值的话,那么采用ref_val直接引用的方式保存。

    上述改动的目的,主要是支持Variant之间互相拷贝构造,互相赋值,以及Array和Variant之间互相拷贝,互相赋值。

    后面考虑对String,Object也做一些完善,确保用户使用起来没有太多疑虑。

    opened by owenliang 2
  • ubuntu 上编译报错

    ubuntu 上编译报错

    c++ -DHAVE_CONFIG_H -g -o cpp_ext.so -O0 -fPIC -shared extension.cpp -std=c++11 -lphpx php-config --includes -Iphp-config --include-dir /usr/bin/ld: 找不到 -lphpx collect2: error: ld returned 1 exit status Makefile:8: recipe for target 'cpp_ext.so' failed make: *** [cpp_ext.so] Error 1

    question 
    opened by hanlicun 2
  • 在macbookpro下面编译报错···

    在macbookpro下面编译报错···

    PHP-X/examples/cpp_ext~ make

    c++ -DHAVE_CONFIG_H -g -o cpp_ext.so -O0 -fPIC -shared extension.cpp -std=c++11 -lphpx php-config --includes -Iphp-config --include-dir Undefined symbols for architecture x86_64: "___zend_malloc", referenced from: php::Variant::Variant(char const*) in extension-21f5f7.o php::String::String(char const*) in extension-21f5f7.o "__array_init", referenced from: php::Array::Array(php::Variant&) in extension-21f5f7.o

    "__efree", referenced from: php::String::~String() in extension-21f5f7.o "__emalloc", referenced from: php::Variant::Variant(char const*) in extension-21f5f7.o php::String::String(char const*) in extension-21f5f7.o "__zval_ptr_dtor", referenced from: php::Variant::~Variant() in extension-21f5f7.o "_add_index_zval", referenced from: php::Array::set(int, php::Variant) in extension-21f5f7.o "_zend_fetch_resource", referenced from: php::String* php::Variant::toResourcephp::String(char const*) in extension-21f5f7.o "_zend_read_property", referenced from: php::Object::get(char const*) in extension-21f5f7.o "_zend_register_resource", referenced from: php::Variant php::newResourcephp::String(char const*, php::String*) in extension-21f5f7.o "_zend_update_property", referenced from: php::Object::set(char const*, php::Variant&) in extension-21f5f7.o "_zval_add_ref", referenced from: php::Variant::addRef() in extension-21f5f7.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make: *** [cpp_ext.so] Error 1

    question 
    opened by visionyimian 2
  • PHP 7.3: make -j 4 報錯

    PHP 7.3: make -j 4 報錯

    System:

    • OS: Arch Linux, Linux Kernel 4.20.13
    • cmake: 3.13.4
    • gcc, g++: 8.2.1
    • phpize: PHP API Version 20180731, Zend Module Api No: 20180731, Zend Extension Api No: 320180731

    Error Message:

    Scanning dependencies of target phpx
    [  9%] Building CXX object CMakeFiles/phpx.dir/src/exec.o
    [ 18%] Building CXX object CMakeFiles/phpx.dir/src/class.o
    [ 36%] Building CXX object CMakeFiles/phpx.dir/src/array.o
    [ 36%] Building CXX object CMakeFiles/phpx.dir/src/base.o
    /home/chivincent/tmp/phpx/src/class.cc: In member function 「bool php::Class::activate()」:
    /home/chivincent/tmp/phpx/src/class.cc:226:75: 錯誤:too few arguments to function 「int zend_register_class_alias_ex(const char*, size_t, zend_class_entry*, int)」
    if (zend_register_class_alias_ex(alias.c_str(), alias.length(), ce) < 0)
    ^
    In file included from /usr/include/php/main/php.h:37,
    from /home/chivincent/tmp/phpx/include/phpx.h:23,
    from /home/chivincent/tmp/phpx/src/class.cc:19:
    /usr/include/php/Zend/zend_API.h:289:14: 附註:declared here
    ZEND_API int zend_register_class_alias_ex(const char *name, size_t name_len, zend_class_entry *ce, int persistent);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/chivincent/tmp/phpx/src/base.cc: In function 「int php::validate_constant_array(HashTable*)」:
    /home/chivincent/tmp/phpx/src/base.cc:74:13: 錯誤:「struct _zend_array::<unnamed union>::<unnamed>」 has no member named 「nApplyCount」
    ht->u.v.nApplyCount++;
    ^~~~~~~~~~~
    /home/chivincent/tmp/phpx/src/base.cc:84:46: 錯誤:「struct _zend_array::<unnamed union>::<unnamed>」 has no member named 「nApplyCount」
    if (Z_ARRVAL_P(val)->u.v.nApplyCount > 0)
    ^~~~~~~~~~~
    /home/chivincent/tmp/phpx/src/base.cc:106:13: 錯誤:「struct _zend_array::<unnamed union>::<unnamed>」 has no member named 「nApplyCount」
    ht->u.v.nApplyCount--;
    ^~~~~~~~~~~
    /home/chivincent/tmp/phpx/src/base.cc: In function 「bool php::define(const char*, const php::Variant&, bool)」:
    /home/chivincent/tmp/phpx/src/base.cc:211:26: 錯誤:「zend_constant」 {aka 「struct _zend_constant」} has no member named 「flags」
    register_constant: c.flags = case_sensitive ? CONST_CS : 0; /* non persistent */
    ^~~~~
    /home/chivincent/tmp/phpx/src/base.cc:213:7: 錯誤:「zend_constant」 {aka 「struct _zend_constant」} has no member named 「module_number」
    c.module_number = PHP_USER_CONSTANT;
    ^~~~~~~~~~~~~
    /home/chivincent/tmp/phpx/src/base.cc: In function 「ZEND_RESULT_CODE php::_check_args_num(zend_execute_data*, int)」:
    /home/chivincent/tmp/phpx/src/base.cc:342:82: 錯誤:too many arguments to function 「void zend_wrong_parameters_count_error(int, int)」
    zend_wrong_parameters_count_error(1, num_args, min_num_args, max_num_args);
    ^
    In file included from /usr/include/php/main/php.h:37,
    from /home/chivincent/tmp/phpx/include/phpx.h:23,
    from /home/chivincent/tmp/phpx/src/base.cc:19:
    /usr/include/php/Zend/zend_API.h:701:39: 附註:declared here
    ZEND_API ZEND_COLD void ZEND_FASTCALL zend_wrong_parameters_count_error(int min_num_args, int max_num_args);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    make[2]: *** [CMakeFiles/phpx.dir/build.make:89: CMakeFiles/phpx.dir/src/class.o] Error 1
    make[2]: *** Waiting for unfinished jobs....
    [ 45%] Building CXX object CMakeFiles/phpx.dir/src/extension.o
    make[2]: *** [CMakeFiles/phpx.dir/build.make:76: CMakeFiles/phpx.dir/src/base.o] Error 1
    /home/chivincent/tmp/phpx/src/extension.cc: In member function 「void php::Extension::registerIniEntries(int)」:
    /home/chivincent/tmp/phpx/src/extension.cc:213:23: 警告:narrowing conversion of 「entry.php::Extension::IniEntry::modifiable」 from 「int」 to 「uint32_t」 {aka 「unsigned int」} inside { } [-Wnarrowing]
    entry.modifiable, // modifiable
    ~~~~~~^~~~~~~~~~
    /home/chivincent/tmp/phpx/src/extension.cc:214:17: 警告:narrowing conversion of 「(uint)entry.php::Extension::IniEntry::name.std::__cxx11::basic_string<char>::size()」 from 「uint」 {aka 「unsigned int」} to 「uint16_t」 {aka 「short unsigned int」} inside { } [-Wnarrowing]
    (uint)entry.name.size(), // name_length
    ^~~~~~~~~~~~~~~~~~~~~~~
    /home/chivincent/tmp/phpx/src/extension.cc:215:17: 警告:narrowing conversion of 「(uint)entry.php::Extension::IniEntry::default_value.std::__cxx11::basic_string<char>::size()」 from 「uint」 {aka 「unsigned int」} to 「uint8_t」 {aka 「unsigned char」} inside { } [-Wnarrowing]
    (uint)entry.default_value.size(), // value_length
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    make[1]: *** [CMakeFiles/Makefile2:73: CMakeFiles/phpx.dir/all] Error 2
    make: *** [Makefile:130: all] Error 2
    

    Errors 可能發生原因:

    1. zend_register_class_alias_ex 函式簽名改變:另外新增 int presistent 參數
    1. (_zend_array)hashTable->u.v.nApplyCount 未定義:改為 zend_uchar _unused
    1. _zend_constant 未包含 flagsmodule_number:使用 ZEND_CONSTANT_FLAGSZEND_CONSTANT_MODULE_NUMBER macro 計算 flasg 與 module_number
    1. zend_worng_parameters_count_error 函式簽名改變:不需再傳入 should_free 參數
    1. php_addslashes 函式簽名改變

    Warnings 可能發生原因:

    1. _zend_ini_entry_def 結構內容改變
    opened by chivincent 1
  • mac编译libphpx.so报错

    mac编译libphpx.so报错

    php是7.2 用的macos gcc是9.4 composer是2.1.1

    执行make -j 4报错: ➜ phpx-0.3.0 make -j 4 Consolidate compiler generated dependencies of target phpx Consolidate compiler generated dependencies of target phpx_static [ 4%] Building CXX object CMakeFiles/phpx_static.dir/src/extension.o [ 9%] Building CXX object CMakeFiles/phpx.dir/src/extension.o [ 13%] Building CXX object CMakeFiles/phpx.dir/src/variant.o [ 18%] Building CXX object CMakeFiles/phpx_static.dir/src/variant.o In file included from /Users/admin/Downloads/phpx-0.3.0/src/extension.cc:17: In file included from /Users/admin/Downloads/phpx-0.3.0/include/phpx.h:20: In file included from /usr/local/Cellar/[email protected]/7.2.34_4/include/php/main/php.h:35: In file included from /usr/local/Cellar/[email protected]/7.2.34_4/include/php/Zend/zend.h:328: /usr/local/Cellar/[email protected]/7.2.34_4/include/php/Zend/zend_operators.h:114:18: warning: 'finite' is deprecated: first deprecated in macOS 10.9 - Use isfinite((double)x) instead. [-Wdeprecated-declarations] if (UNEXPECTED(!zend_finite(d)) || UNEXPECTED(zend_isnan(d))) { ^ /usr/local/Cellar/[email protected]/7.2.34_4/include/php/main/php_config.h:2675:24: note: expanded from macro 'zend_finite' #define zend_finite(a) finite(a) ^ /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/math.h:749:12: note: 'finite' has been explicitly marked deprecated here extern int finite(double) ^ In file included from /Users/admin/Downloads/phpx-0.3.0/src/extension.cc:17: In file included from /Users/admin/Downloads/phpx-0.3.0/include/phpx.h:20: In file included from /usr/local/Cellar/[email protected]/7.2.34_4/include/php/main/php.h:35: In file included from /usr/local/Cellar/[email protected]/7.2.34_4/include/php/Zend/zend.h:328: /usr/local/Cellar/[email protected]/7.2.34_4/include/php/Zend/zend_operators.h:125:18: warning: 'finite' is deprecated: first deprecated in macOS 10.9 - Use isfinite((double)x) instead. [-Wdeprecated-declarations] if (UNEXPECTED(!zend_finite(d)) || UNEXPECTED(zend_isnan(d))) { ^ /usr/local/Cellar/[email protected]/7.2.34_4/include/php/main/php_config.h:2675:24: note: expanded from macro 'zend_finite' #define zend_finite(a) finite(a) ^ /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/math.h:749:12: note: 'finite' has been explicitly marked deprecated here extern int finite(double) ^ In file included from /Users/admin/Downloads/phpx-0.3.0/src/variant.cc:17: In file included from /Users/admin/Downloads/phpx-0.3.0/include/phpx.h:20: In file included from /usr/local/Cellar/[email protected]/7.2.34_4/include/php/main/php.h:35: In file included from /usr/local/Cellar/[email protected]/7.2.34_4/include/php/Zend/zend.h:328: /usr/local/Cellar/[email protected]/7.2.34_4/include/php/Zend/zend_operators.h:114:18: warning: 'finite' is deprecated: first deprecated in macOS 10.9 - Use isfinite((double)x) instead. [-Wdeprecated-declarations] if (UNEXPECTED(!zend_finite(d)) || UNEXPECTED(zend_isnan(d))) { ^ /usr/local/Cellar/[email protected]/7.2.34_4/include/php/main/php_config.h:2675:24: note: expanded from macro 'zend_finite' #define zend_finite(a) finite(a) ^ /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/math.h:749:12: note: 'finite' has been explicitly marked deprecated here extern int finite(double) ^ In file included from /Users/admin/Downloads/phpx-0.3.0/src/variant.cc:17: In file included from /Users/admin/Downloads/phpx-0.3.0/include/phpx.h:20: In file included from /usr/local/Cellar/[email protected]/7.2.34_4/include/php/main/php.h:35: In file included from /usr/local/Cellar/[email protected]/7.2.34_4/include/php/Zend/zend.h:328: /usr/local/Cellar/[email protected]/7.2.34_4/include/php/Zend/zend_operators.h:125:18: warning: 'finite' is deprecated: first deprecated in macOS 10.9 - Use isfinite((double)x) instead. [-Wdeprecated-declarations] if (UNEXPECTED(!zend_finite(d)) || UNEXPECTED(zend_isnan(d))) { ^ /usr/local/Cellar/[email protected]/7.2.34_4/include/php/main/php_config.h:2675:24: note: expanded from macro 'zend_finite' #define zend_finite(a) finite(a) ^ /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/math.h:749:12: note: 'finite' has been explicitly marked deprecated here extern int finite(double) ^ In file included from /Users/admin/Downloads/phpx-0.3.0/src/extension.cc:17: In file included from /Users/admin/Downloads/phpx-0.3.0/include/phpx.h:20: In file included from /usr/local/Cellar/[email protected]/7.2.34_4/include/php/main/php.h:35: In file included from /usr/local/Cellar/[email protected]/7.2.34_4/include/php/Zend/zend.h:328: /usr/local/Cellar/[email protected]/7.2.34_4/include/php/Zend/zend_operators.h:114:18: warning: 'finite' is deprecated: first deprecated in macOS 10.9 - Use isfinite((double)x) instead. [-Wdeprecated-declarations] if (UNEXPECTED(!zend_finite(d)) || UNEXPECTED(zend_isnan(d))) { ^ /usr/local/Cellar/[email protected]/7.2.34_4/include/php/main/php_config.h:2675:24: note: expanded from macro 'zend_finite' #define zend_finite(a) finite(a) ^ /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/math.h:749:12: note: 'finite' has been explicitly marked deprecated here extern int finite(double) ^ In file included from /Users/admin/Downloads/phpx-0.3.0/src/extension.cc:17: In file included from /Users/admin/Downloads/phpx-0.3.0/include/phpx.h:20: In file included from /usr/local/Cellar/[email protected]/7.2.34_4/include/php/main/php.h:35: In file included from /usr/local/Cellar/[email protected]/7.2.34_4/include/php/Zend/zend.h:328: /usr/local/Cellar/[email protected]/7.2.34_4/include/php/Zend/zend_operators.h:125:18: warning: 'finite' is deprecated: first deprecated in macOS 10.9 - Use isfinite((double)x) instead. [-Wdeprecated-declarations] if (UNEXPECTED(!zend_finite(d)) || UNEXPECTED(zend_isnan(d))) { In file included from ^ /Users/admin/Downloads/phpx-0.3.0/src/variant.cc:17: In file included from /Users/admin/Downloads/phpx-0.3.0/include/phpx.h:20/usr/local/Cellar/[email protected]/7.2.34_4/include/php/main/php_config.h: :In file included from 2675/usr/local/Cellar/[email protected]/7.2.34_4/include/php/main/php.h::2435:: In file included from /usr/local/Cellar/[email protected]/7.2.34_4/include/php/Zend/zend.h:note328: : expanded from /usr/local/Cellar/[email protected]/7.2.34_4/include/php/Zend/zend_operators.hmacro: 114'zend_finite':18 : warning: 'finite' is deprecated: first deprecated in macOS #define zend_finite(a) finite(a) 10.9 ^- Use isfinite((double)x) instead. [-Wdeprecated-declarations] /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/math.h:749:12: note: 'finite' has been explicitly marked deprecated here extern int finite(double) ^ if (UNEXPECTED(!zend_finite(d)) || UNEXPECTED(zend_isnan(d))) { ^ /usr/local/Cellar/[email protected]/7.2.34_4/include/php/main/php_config.h:2675:24: note: expanded from macro 'zend_finite' #define zend_finite(a) finite(a) ^ /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/math.h:749:12: note: 'finite' has been explicitly marked deprecated here extern int finite(double) ^ In file included from /Users/admin/Downloads/phpx-0.3.0/src/variant.cc:17: In file included from /Users/admin/Downloads/phpx-0.3.0/include/phpx.h:20: In file included from /usr/local/Cellar/[email protected]/7.2.34_4/include/php/main/php.h:35: In file included from /usr/local/Cellar/[email protected]/7.2.34_4/include/php/Zend/zend.h:328: /usr/local/Cellar/[email protected]/7.2.34_4/include/php/Zend/zend_operators.h:125:18: warning: 'finite' is deprecated: first deprecated in macOS 10.9 - Use isfinite((double)x) instead. [-Wdeprecated-declarations] if (UNEXPECTED(!zend_finite(d)) || UNEXPECTED(zend_isnan(d))) { ^ /usr/local/Cellar/[email protected]/7.2.34_4/include/php/main/php_config.h:2675:24: note: expanded from macro 'zend_finite' #define zend_finite(a) finite(a) ^ /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/math.h:749:12: note: 'finite' has been explicitly marked deprecated here extern int finite(double) ^ In file included from /Users/admin/Downloads/phpx-0.3.0/src/extension.cc:17: /Users/admin/Downloads/phpx-0.3.0/include/phpx.h:329:20: warning: 'this' pointer cannot be null in well-defined C++ code; pointer may be assumed to always convert to true [-Wundefined-bool-conversion] return this; ^~~~ In file included from /Users/admin/Downloads/phpx-0.3.0/src/variant.cc:17: /Users/admin/Downloads/phpx-0.3.0/include/phpx.h:329:20: warning: 'this' pointer cannot be null in well-defined C++ code; pointer may be assumed to always convert to true [-Wundefined-bool-conversion] return this; ^~~~ In file included from /Users/admin/Downloads/phpx-0.3.0/src/extension.cc:17: /Users/admin/Downloads/phpx-0.3.0/include/phpx.h:329:20: warning: 'this' pointer cannot be null in well-defined C++ code; pointer may be assumed to always convert to true [-Wundefined-bool-conversion] return this; ^~~~ In file included from /Users/admin/Downloads/phpx-0.3.0/src/variant.cc:17: /Users/admin/Downloads/phpx-0.3.0/include/phpx.h:329:20: warning: 'this' pointer cannot be null in well-defined C++ code; pointer may be assumed to always convert to true [-Wundefined-bool-conversion] return this; ^~~~ /Users/admin/Downloads/phpx-0.3.0/src/extension.cc:159:13: error: non-constant-expression cannot be narrowed from type 'uint32_t' (aka 'unsigned int') to 'int' in initializer list [-Wc++11-narrowing] (uint32_t) entry.modifiable, // modifiable ^~~~~~~~~~~~~~~~~~~~~~~~~~~ /Users/admin/Downloads/phpx-0.3.0/src/extension.cc:159:13: note: insert an explicit cast to silence this issue (uint32_t) entry.modifiable, // modifiable ^~~~~~~~~~~~~~~~~~~~~~~~~~~ static_cast( ) /Users/admin/Downloads/phpx-0.3.0/src/extension.cc:159:13: error: non-constant-expression cannot be narrowed from type 'uint32_t' (aka 'unsigned int') to 'int' in initializer list [-Wc++11-narrowing] (uint32_t) entry.modifiable, // modifiable ^~~~~~~~~~~~~~~~~~~~~~~~~~~ /Users/admin/Downloads/phpx-0.3.0/src/extension.cc:159:13: note: insert an explicit cast to silence this issue (uint32_t) entry.modifiable, // modifiable ^~~~~~~~~~~~~~~~~~~~~~~~~~~ static_cast( ) 3 warnings generated. 3 warnings generated. 3 warnings and 1 error generated. 3 warnings and 1 error generated. make[2]: *** [CMakeFiles/phpx.dir/src/extension.o] Error 1 make[1]: *** [CMakeFiles/phpx.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs.... make[2]: *** [CMakeFiles/phpx_static.dir/src/extension.o] Error 1 make[1]: *** [CMakeFiles/phpx_static.dir/all] Error 2 make: *** [all] Error 2

    opened by OneHundred86 0
  • compile failed on windows with vs2017

    compile failed on windows with vs2017

    Two errors occurred while compiling on win7: phpx\src\class.cc(155): error C2440: “=”: 无法从“void (__cdecl *)(zend_execute_data *,zval *)”转换为“zif_handler” phpx\src\extension.cc(169): error C2440: “=”: 无法从“void (__cdecl *)(zend_execute_data *,zval *)”转换为“zif_handler”

    My env: windows 7 php-7.3.22 TS VS2017 (vc15)

    phpdev需要的头文件都已经包含,编译预处理都已加过。vs2017新建工程然后把代码导入进来后者cmake转vs工程编译后都是一样的错误。

    opened by 479923197 0
  • Mac cmake fail

    Mac cmake fail

    mac version : 10.14.6 php version: PHP 7.1.23 (cli) (built: Feb 22 2019 22:19:32) ( NTS ) Copyright (c) 1997-2018 The PHP Group Zend Engine v3.1.0, Copyright (c) 1998-2018 Zend Technologies

    grantMac:phpx zch$ cmake . CMake Error at CMakeLists.txt:28 (execute_process): execute_process called with no value for OUTPUT_VARIABLE.

    PHP_INCLUDE_DIR: /usr/include/php -undefined dynamic_lookup -- Configuring incomplete, errors occurred!

    opened by zch513430014 1
Owner
韩天峰-Rango
韩天峰-Rango
Raidbots API wrapper which incorporates existing reports and static data into your project.

Raidbots API Raidbots API wrapper which incorporates existing reports and static data into your project. Usage use Logiek\Raidbots\Client; $client =

Logiek 2 Dec 23, 2021
An object oriented PHP wrapper for the Livepeer API

Livepeer PHP An object oriented PHP wrapper for the Livepeer API Requirements PHP >= 7.4 A PSR-17 implementation A PSR-18 implementation Install Via C

Owen Voke 2 Nov 23, 2021
A PHP wrapper for the Instagram API. Feedback or bug reports are appreciated.

Instagram PHP API V2 Note: On the 17 Nov 2015 Instagram made changes to their API . Apps created before Nov 17, 2015 wont be affected until Jun 2016.

Christian Metz 1.5k Dec 23, 2022
Simple and effective multi-format Web API Server to host your PHP API as Pragmatic REST and / or RESTful API

Luracast Restler ![Gitter](https://badges.gitter.im/Join Chat.svg) Version 3.0 Release Candidate 5 Restler is a simple and effective multi-format Web

Luracast 1.4k Dec 14, 2022
An easy to use Fractal wrapper built for Laravel and Lumen applications

An easy to use Fractal wrapper built for Laravel and Lumen applications The package provides a nice and easy wrapper around Fractal for use in your La

Spatie 1.8k Dec 30, 2022
Laravel wrapper for Facebook's GraphQL

Laravel GraphQL Use Facebook's GraphQL with Laravel 6.0+. It is based on the PHP port of GraphQL reference implementation. You can find more informati

Mikk Mihkel Nurges 1.9k Dec 31, 2022
This API aims to present a brief to consume a API resources, mainly for students in the early years of Computer Science courses and the like.

Simple PHP API v.1.0 This API aims to present a brief to consume a API resources, mainly for students in the early years of Computer Science courses a

Edson M. de Souza 14 Nov 18, 2021
微信支付 API v3 的 PHP Library,同时也支持 API v2

微信支付 WeChatPay OpenAPI SDK [A]Sync Chainable WeChatPay v2&v3's OpenAPI SDK for PHP 概览 微信支付 APIv2&APIv3 的Guzzle HttpClient封装组合, APIv2已内置请求数据签名及XML转换器,应

null 275 Jan 5, 2023
This API provides functionality for creating and maintaining users to control a simple To-Do-List application. The following shows the API structure for users and tasks resources.

PHP API TO-DO-LIST v.2.0 This API aims to present a brief to consume a API resources, mainly for students in the early years of Computer Science cours

Edson M. de Souza 6 Oct 13, 2022
API documentation API SCB EASY APP

SCB-API-EASY V3.0 API documentation SIAM COMMERCIAL BANK PUBLIC COMPANY LTD. API SCB Easy V3 endpoint = https://fasteasy.scbeasy.link 1.0. Get balance

SCB API Esay team 2 Sep 28, 2021
Courier API adalah project API untuk mengetahui ongkos kirim Logistik-logistik pengiriman barang antar kota & International

Courier API Courier API adalah project API untuk mengetahui ongkos kirim Logistik-logistik pengiriman barang antar kota (dalam negeri) & International

Rangga Darmajati 2 Sep 24, 2021
Laravel api tool kit is a set of tools that will help you to build a fast and well-organized API using laravel best practices.

Laravel API tool kit and best API practices Laravel api tool kit is a set of tools that will help you to build a fast and well-organized API using lar

Ahmed Esa 106 Nov 22, 2022
LaraBooks API - Simple API for iOS SwiftUI app tests.

About Laravel Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experie

Konrad Podrygalski 1 Nov 13, 2021
Simple PHP API client for tube-hosting.com rest API

Tube-Hosting API PHP client Explanation This PHP library is a simple api wrapper/client for the tube-hosting.com api. It is based on the provided docu

null 4 Sep 12, 2022
Best resources restful api for developers (with JSON:API standar specification design)

List API Best resources restful api for developers (with JSON:API standar specification design). API Resource Endpoint Name Resource Description Al Qu

Noval 2 Jan 18, 2022
Chargebee API PHP Client (for API version 2 and Product Catalog version 2.0)

chargebee-php-sdk Overview This package provides an API client for Chargebee subscription management services. It connects to Chargebee REST APIs for

GLOBALIS media systems 8 Mar 8, 2022
GraphQL API to Studio Ghibli REST API

GhibliQL GhibliQL is a GraphQL wrapper to the Studio Ghibli REST API Usage First, you'll need a GraphQL client to query GhibliQL, like GraphQL IDE Con

Sebastien Bizet 8 Nov 5, 2022
Single file PHP script that adds a REST API to a SQL database

PHP-CRUD-API Single file PHP script that adds a REST API to a MySQL/MariaDB, PostgreSQL, SQL Server or SQLite database. NB: This is the TreeQL referen

Maurits van der Schee 3.2k Jan 8, 2023
Open source API management platform

About Fusio is an open source API management platform which helps to build and manage REST APIs. Fusio provides all tools to quickly build an API from

Apioo 1.2k Jan 4, 2023