All Questions
Tagged with php-internals php-extension
60
questions
1
vote
0
answers
267
views
How to create a php extension function with a return type-hint plus annotation
I'm trying to fix some php 8.1 deprecation notices in a PHP extension, which I believe involves either adding return type-hints (where possible, whilst maintaining some backwards-compatibility to php7....
2
votes
1
answer
540
views
pdo_module.obj : error LNK2019: unresolved external symbol "int __cdecl php_pdo_register_driver(struct pdo_driver_t *)"
LINK: unresolved external symbol :php_pdo_register_driver
I'm writing a PHP PDO ext demo with PHP7.2.21, when I tried to register my ext on PDO, I got an error.
PHP_MINIT_FUNCTION(pdo_my_mysql) {
#...
0
votes
0
answers
53
views
Tag a data to curl HTTP request in PHP C++ extension
I have a PHP C++ extension that monitors the web requests and captures the required request details with Call stacks.
Here from my PHP C++ extension whenever curl_exec(..) happens and a HTTP ...
2
votes
1
answer
265
views
Getting function argument value from PHP extension in c++
I have created php extension in c++.In version php 5.6 can able to get currently executed function details. I was getting the arguments value as follows,
if (real_execute_data->function_state....
1
vote
2
answers
248
views
Fetch the function return value in PHP extension C++
I have created an php extension in c++ which tracks the call graph of each request(centos7-64 bit,PHP5.6).And now,I want to get the function return value of each function.
It can be done by using ...
2
votes
0
answers
207
views
What is the proper way to add elements to an empty array passed to an extension function in PHP 7.3?
I'm trying to port an old PHP extension of mine working for PHP 5.4 to PHP 7.3 (7.3.0 RC3 more precisely).
I'm building the extension using Visual Studio 2017 on Windows 10 Pro x64, building both for ...
29
votes
0
answers
1k
views
Pre-compiling PHP files [closed]
As a learning exercise, I'm trying to save the compiled state of a PHP file in order to execute it at a later time without having to go through zend_compile_file again.
The first thing I did was ...
10
votes
2
answers
15k
views
What is the difference between Mysqlnd, PDO and PDO_Mysql extensions in php?
They seem to be the same thing, and yet different. I don't know which one is which: I know we can use PDO as new PDO() and use prepare() and query() methods, to fetch data from database. So, if this ...
3
votes
1
answer
393
views
Call object constructor (__construct) from a php extension
I'm just experimenting with a PHP extension and I would like to know what is the suggested/preferred way to call an object constructor within the extension.
I've read that, by calling the ...
3
votes
1
answer
349
views
Expose version of extension in phpinfo() output
When writing custom extensions for PHP, you usually define a version string in the header file of your extension, e.g. something like
#define PHP_MYEXT_VERSION "0.1.0"
PHP will then use this to ...
5
votes
1
answer
7k
views
What is exactly a zend extension?
if you look at this documentation, the first parameter returns only Zend extensions.
What is exactly a Zend extension, as compared to a PHP ("simple") extension?
3
votes
1
answer
702
views
How does PHP 7 remove the resources from the regular list?
I am upgrading a php extension to php 7, and I want to remove a resource that is been registered in the regular list using zend_register_resourceand later I am closing the resource using ...
0
votes
0
answers
240
views
How to declare Closure function in PHP extension?
I learning php extension write in C.
Now i meet code below, i want to declare a Closure function.
How to achieve this in a PHP extension?
class myClass
{
public function removeListener($event, ...
6
votes
2
answers
1k
views
Zend: How to correctly destruct a custom object in PHP 7?
I'm learning PHP extension writing in order to make some old extensions work with PHP 7.
I tried to modify the sample extension from http://devzone.zend.com/1435/wrapping-c-classes-in-a-php-extension/...
2
votes
1
answer
1k
views
How to upgrade PHP function parameters work with new Zend API?
I am working on a php extension to upgrade it to PHP7, my question is about INTERNAL_FUNCTION_PARAMETERS. In the previous version it is defined as:
INTERNAL_FUNCTION_PARAMETERS int ht, zval *...