All Questions
Tagged with php-internals php-7
9
questions
0
votes
1
answer
77
views
Passing HashTable data from php.ini to an extension method: corrupted values
I am trying to make a PHP (7.4) extension use in an extension method a setting from php.ini (like myext.map=key1=val1,key2=val2;) parsed as an associative array. I want the parsing to happen in ...
1
vote
0
answers
43
views
What is the role of uninitialized_zval in the PHP kernel?
uninitialized_zval appears in multiple places in the PHP kernel, but I don't know what it does. For example, in the ZEND_ASSIGN_DIM_SPEC_CV_UNUSED_OP_DATA_CONST_HANDLER handler:
...
3
votes
2
answers
343
views
Which is faster between (string)$value and "$value" when casting to a string
In PHP, assuming $value = 12345;(an integer), which is faster when casting $value from an integer to a string;
$value = (string)$value;
or
$value = "$value";
This is a kind of performance measure ...
0
votes
1
answer
445
views
PHP 7 : How to generate zend_string variable of length 0
I am working in PHP 7, I have a case in which i want to pass a string of length 0. so how can we generate zend_string variable of length 0.
I tried assigning NULL to zend_string variable but down the ...
1
vote
0
answers
290
views
Finding from symbol_table is failing in php 7
I have couple of questions.
I have written test case like this.
$animals = array(
array('Spook', 'spook.png'),
array('Helmut', 'pic1.jpg')
);
foreach($animals as $row){
$name = $row[0];
...
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
1
answer
110
views
What is the substitute for is_ref__gc in php7
In php5, zval struct has a member 'is_ref__gc'. We can use it as follow:
zval *x
...
...
if (!x->is_ref__gc)
{
printf("newx or newy isn't by ref");
return;
}
However, in ...
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 *...