Skip to main content

Questions tagged [php-internals]

How the PHP programming language works underneath, and questions about the underlying C code.

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 ...
Sel_va's user avatar
  • 608
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....
Durai's user avatar
  • 87
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: ...
hantao huang's user avatar
5 votes
2 answers
1k views

Which PHP functions are affected by allow_url_fopen?

In PHP, the allow_url_fopen flag controls whether or not remote URLs can be used by various file system functions, in order to access remote files. It is recommended security best practice nowadays ...
HappyDog's user avatar
  • 1,283
1 vote
1 answer
410 views

What goes in the PHP root buffer and what happens if it gets bigger than 10K

I have a long-running PHP script that seems to have a memory leak and that got me diving into how PHP garbage collection works. I had some questions about it and maybe there are some people on here ...
rbalik's user avatar
  • 93
0 votes
1 answer
88 views

Object Iteration [closed]

I know that iteration over an object is equal to iterating over the visible properties of the class. class MyClass { public $var1 = 'value 1'; public $var2 = 'value 2'; public $var3 = '...
hoseinz3's user avatar
  • 638
0 votes
1 answer
202 views

How to read this function in C?

While reading about PHP Zend Engine internals, I came across function zend_parse_parameters() which is used as the following if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &number) ...
Nadir's user avatar
  • 13
2 votes
0 answers
2k views

The Zend Engine API version 320170718 which is installed, is newer

I am currently experiencing a problem with xdebug. I wanted to do a php bin/console cache:clear for my Symfony application but it got me this error: Warning: Xdebug MUST be loaded as a Zend ...
Lucatorze's user avatar
  • 107
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 ...
Derick Alangi's user avatar
2 votes
2 answers
293 views

PHP7 hashtable internal structure

There is very efficient assoc. array C language implementation used in php source code. /* * HashTable Data Layout * ===================== * * +=============================+ * ...
legale's user avatar
  • 682
0 votes
0 answers
45 views

what is the functionality of `/* $Id$ */` in php-src files

It's included in many files. For example: /* $Id: php_cli.c 306938 2011-01-01 02:17:06Z felipe $ */ Is this helping debug process or something else? Any tool related?
Gavin Kwok's user avatar
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 ...
Durai's user avatar
  • 87
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 ...
Carlo Pastorino's user avatar
2 votes
0 answers
166 views

Apache, mod_php, and MINIT

When running PHP programs using mod_php, when does PHP call its extension's MINIT functions? Does this happen When the apache web server restarts? Whenever apache spins up a new thread pool to ...
Alana Storm's user avatar
0 votes
1 answer
722 views

var_dump(object) results "*RECURSION*"

I'm write simple extension with class definition extension.h zend_class_entry * ExampleClass_class; zend_class_entry * get_ExampleClass_class(); extension.c #include "php.h" #include "extension.h" ...
rjhdby's user avatar
  • 1,341

15 30 50 per page
1 2
3
4 5
18