Comments (5)
就像 call_user_func_array 一样,参数用数组传递,避免频繁new 对象
from pni.
Hi,您好munggruel! 谢谢提意见啊(开心),针对这个issue,我说一下哈~
- foreach 循环调用,会重复new对象。可不可以用这个方法?循环使用表示参数类型的对象,每个表示PNIDataType,都有一个成员函数 setValue,用来更改参数,这样就可以重复使用对象了。这个功能我今天加上哈。
2.做这个库性能是一方面,还有的作用是解决PHP无法完成的功能,比如调用机器学习库、图像处理这类C/C++的库。
3.每次调用都要New对象,主要是考虑编程的安全,PHP是弱类型语言,而C是强类型语言,写PHP的人容易在参数类型上不讲究,调用很容易出错,用对象约束并提醒开发者,调用前一定要确认要调用的C函数的参数类型。
from pni.
Hi,我已经加上了setValue 这个成员函数啦
from pni.
好的,不知道什么时候能支持windows版本,其实最大的障碍在编译 php extension的dll,普通的windows
dll很简单,但是 php那个编译 dll实在太麻烦了
from pni.
在windows上,使用cygwin 下面的gcc , 好像是可以的,回头我试一下。
from pni.
Related Issues (5)
- 并发情况下,动态库 会加载1次还是 多次 HOT 2
- 能否封装一下PHP-CPP这个项目的数据结构 HOT 1
- 能不能兼容一下windows 把dlopen换成loadlibrary HOT 1
- 在windows上可以尝试cygwin来编译 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pni.