I don't know what kind of php extensions can be developed using zephir? #2412
Replies: 4 comments 4 replies
-
|
Any type of logic that you want to ship as single compiled PHP extension. Any composer package can be rewritten in Zephir and shipped as PHP extension... |
Beta Was this translation helpful? Give feedback.
-
|
I would like to write an extension that will log access to certain PHP variable arrays or superglobals. Example would be: <?php
print($_SERVER['REMOTE_ADDR']);
?>In that case when the request is being made the extension would log to a file Is it possible to do using Zephir? |
Beta Was this translation helpful? Give feedback.
-
|
For security purposes it would be great to have the extension to log any outgoing requests (get, post.. url, payload, headers) of file_get_contents, fopen, curl, fsockopen, mail, etc. |
Beta Was this translation helpful? Give feedback.
-
|
https://github.com/coral-media/php-ext Thats my new baby, so far I am using Zephir to wrap around C libraries. I am still developing primitives, but I could not find a Bayes implementation in C meeting my expectations and requirements, so I probably will end up implementing the Bayes (Multinomial, Gaussian, Bernoulli, etc) myself in Zephir. I see Zephir as a good tool to bring Scientific Computing to PHP, even without relying in native C libraries (like I am doing and will be optimal for most scenarios), writing the implementations on Zephir should be better than pure PHP. There is the option of using FFI, but for Scientific Computing algorithm could be a nightmare when comes to memory handling. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Can you give an example?
Beta Was this translation helpful? Give feedback.
All reactions