php-internals Questions

3

Solved

I'm loading XML files from disk using file_get_contents, and as a test I find I can load a 156K file using file_get_contents() 1,000 times in 3.99 seconds. I've subclassed the part that does the lo...
Hagiocracy asked 4/3, 2012 at 14:28

2

I'm embeding PHP in my app (writen in Delphi 2010), using PHP4Delphi component to interface with php5ts.dll. I guess my program acts as extension for the PHP (sapi module?) as it registers some fun...
Marchpast asked 25/4, 2011 at 12:36

2

Solved

This is the code & its output I used to draw the inference below: class a { public $var1; public $var2; } $obj0 = new a; var_dump($obj0); class b { public $var1; public $var2; publ...
Dismantle asked 9/1, 2012 at 11:44

2

Let's consider the following code: class a { public $var1; function disp(){ echo $this->var1; } } $obj1 = new a; echo '<br/>After instantiation into $obj1:<br/>'; xdebug_deb...
Andalusia asked 29/12, 2011 at 13:49

2

test.php as plain text: <?php $x = "a"; echo $x; test.php as opcode: debian:~ php -d vld.active=1 -d vld.execute=0 -f test.php Finding entry points Branch analysis from position: 0 Return f...
Hereld asked 1/12, 2011 at 11:58

1

Solved

I am trying to build my own zend module (.so) We have multiple functionality that can be done in our own module which will improve our performance on a high traffic website (50k+ visits a day). T...
Votary asked 20/11, 2011 at 17:2

0

I am writing a PHP extension. From the C code I try to invoke a static method in PHP code. The PHP-method looks like this: <?php class Model { static method GetModelById($id) { ... } }...
Metabolize asked 31/7, 2011 at 18:12

6

Solved

Hey there. Today I wrote a small benchmark script to compare performance of copying variables vs. creating references to them. I was expecting, that creating references to large arrays for example ...
Anthropography asked 28/10, 2010 at 13:37

2

Solved

It was noted in another question that wrapping the result of a PHP function call in parentheses can somehow convert the result into a fully-fledged expression, such that the following works: <?...
Pluralism asked 17/7, 2011 at 20:31

3

Solved

Ok maybe not so puzzling, but here it is. I was messing around and noticed this, typing just <?php in a file, just that, no space after that, nothing else just the tag, throws a parse error. ...
Nacreous asked 17/7, 2011 at 22:14

1

Solved

I was wondering when does PHP free the memory which is used for a variables for example function foo(){ $foo = 'data'; return $foo; // <- is the memory space for `$foo` emptied at this point...
Cousteau asked 11/5, 2011 at 21:56

1

Solved

How do the different MySQL Cursors within PHP manage memory? What I mean is, when I make a MySQL query that retrieves a large result set, and get the MySQL resource back, how much of the data that ...
Leguminous asked 5/5, 2011 at 14:48

1

Solved

how can i write my own module in C ? is it possible ?
Quadrat asked 12/4, 2011 at 6:32

3

Solved

I created a PHP Hello World extension DLL with Microsoft Visual C++ 2008. I have the right php.ini (I know because when I enable and disable the gd2 extension, there is an effect), but when I load ...
Sniffle asked 5/2, 2011 at 15:34

1

Solved

One of the original designs of the Zend engine, if I recall, was that it was to be relatively easy to embed for other languages one might wish to create. Basically, the PHP syntax without all the P...
Gyrostatics asked 6/1, 2010 at 17:58

4

if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|l", &flag) == FAILURE) { return; } Especially what's ZEND_NUM_ARGS() TSRMLS_CC doing?
Moats asked 16/11, 2010 at 6:42

5

Solved

I'm pretty new to PHP, but I've been programming in similar languages for years. I was flummoxed by the following: class Foo { public $path = array( realpath(".") ); } It produced a syntax er...
Substantialize asked 18/10, 2010 at 14:48

3

Please suggest help articles or tutorials about PHP "low" level С-modules programming interface.
Tenpin asked 21/8, 2009 at 11:19

3

Solved

Out of curiousity, I'm reading the Zend Engine API code and encountered quite a number of ## in their #define's. For example, at /usr/lib/php5/Zend/zend_API.h: #define ZEND_FN(name) zif_##name #de...
Motif asked 17/3, 2009 at 9:6

© 2022 - 2024 — McMap. All rights reserved.