JohannesS is a developer who is a hard-core user of the console. Thus, he doesn't like using a browser to visit php.net just for reading documentation.
Have you ever though about extending mysqli's classes. It's pretty simple to subclass the connection class mysqli. However, subclassing mysqli_result and mysqli_stmt is not so obvious, actually I though that it's even not possible.
However, never say never! After discussing mysqli's OO interface for an hour yesterday, with Johannes and Ulf, and breaking two tests of mysqli - 062.phpt and 063.phpt, because I tried to final-ize mysqli_result and mysqli_stmt, as well as make their constructors private, I found out how one can plug his own classes.
You probably know it, but anyways. I am profiling a script of mysqli's test suite to look for unefficiencies in mysqlnd. Callgrind shows me that if you use mysqli_fetch_assoc you lose 5% of the runtime (of the script) compared to the situation when you use mysqli_fetch_row() or mysqli_fetch_assoc().
mysqlnd is pretty efficient if you use mysqli_fetch_assoc(). Zend's hash has a quick API, one passes an already precomputed hash value to it and the hash value doesn't need to be computed. Because mysqlnd knows what the names of the columns in the array in advance will be they are precomputed. How does mysqlnd know? Well, the MySQL server sends metadata about the columns selected, at this time mysqlnd precomputes the hash values, 32bit integer, and then on every fetch_assoc()/fetch_array() call reuses them.
I have a SUN UltraSparc5, which sports a 64bit 270MHz fast CPU. I got it with a 6.4GB HDD and 64MB RAM.
Today I committed the SSL patch for mysqlnd. On my box, an Ubuntu 8.10 with KDE3, a timeout test was failing. I found it strange. The found that SSL_read in ext/openssl/xp_ssl.c doesn't regard the network read_timeout, on the contrary to what recv does.
Here it comes...
First it was registering every persistent stream as a resource in EG(persistent_list). mysqlnd has a hack around this, everyone has a hack.
Few weeks ago I got new hardware for my home network, a QNAP TS 119 Turbo NAS.
Compressed protocol support for mysqlnd has ready alpha patch. Tested with simple queries, not tested against the test suite or big packets.
#define MYSQLND_INC_GLOBAL_STATISTIC(statistic) \
{ \
if (MYSQLND_G(collect_statistics) && statistic != STAT_LAST) { \
mysqlnd_global_stats->values[statistic]++; \
} \
}
I usually don't make this mistake, but in this particular case I did. Can you spot it?
My girlfriend is a freshgirl at the local University of Applied Sciences since beginning of March. She chose to study Computer Science. Maybe affected from the area of my own studies.
I am writing a PHP extension which uses a library written in C++, which means that the actual extension should partially be compiled with a C++ compiler. C++ is stricter when talking about char *.
I hope you know what mysqlnd is. If not, then.... mysqlnd is the replacement for libmysql in the PHP world. Starting from PHP 5.3 you might use mysqlnd to connect to your MySQL Server(s) without installing libmysql on your web servers/client hosts. mysqlnd also promises reduced memory usage compared to the scenario when libmysql is used and should be at least as quick as libmysql. To be able to beat libmysql and create incentives to let you migrate to mysqlnd we had brainstorming sessions. We came with a list of possible features.
You probably saw that I started experimenting with Zend Framework. I used to develop in PHP for 5 years, between 2000 and 2005. Worked for almost 2 years at Dorten, renamed 100 Days, later bought by Zend - their Stuttgart office. Before the Zend time we had in-house CMS system, closed source. Nobody had the time and resources to have it released. It's name was EWMS (Eierlegende WollMilchSau - Wikipedia has an entry about this animal ). This CMS allowed us quickly to build applications. However, it wasn't just clicking and using wizzardry to generate new sites, then fill them with content.
After I saw what Zend_Form might can do, according to the slides of its author, which I read, I have a dream*.
I was amazed when I saw this

Viagra is shown using a HTML table with white and non-white cells.
It all started with a tutorial from Rob Allen, maybe from his book "Zend Framework in Action". A simple site to organize a CD collection list. Zend Framework seems very powerful but it will be insanity for someone to understand it without a tutorial of some kind.
One might ask why do I want a PHP without XML. This is not the first time I want PHP without XML. When developing mysqlnd I needed a binary that builds as quick as possible - linking time with too many libraries is an issue. However, today the reason is other. I want a PHP5 CLI and unfortunately Zend Server CE, of the Zend fame doesn't come with it.
Johannes, the RM of PHP 5.3, found these