The slides from my "Introduction to PostgreSQL" talk at Confooare now available for view/download and can found here: http://ilia.ws/files/confoo_pgsql.pdf. Hopefully it will make people more interested in PostgreSQL, which is a great database system and take it into consideration when making their database platform decisions. For me personally, it was quite interesting, as it is one of the rare chances I get to speak about something that is not directly related to PHP, although I did sneak-in a few PHP specific slides ;-) I would very much appreciate feedback from all who had attended the talk and any suggestions on how to make it better are always welcome. Please send me your comments via this blog or via Joind.in. A big thanks for to Bruce Momjian from Enterprise DB who gave me some really good suggestions on improving the slides (already reflected in the PDF) and Christophe Pettus from PostgreSQL Experts, Inc. whose original PostgreSQL Intro talk had inspired mine.

While profiling our application I came across a a rather strange memory usage by the ob_start() function. We do use ob_start() quite a bit to defer output of data, which is a common thing in many applications. What was unusual is that 16 calls to ob_start() up chewing through almost 700kb of memory, given that the data being buffered rarely exceeds 1-2kb, this was quite unusual. I started looking at the C code of the ob_start() function and found this interesting bit of code inside php_start_ob_buffer() initial_size = 40*1024; block_size = 10*1024; Which directs PHP to pre-allocate 40kb of data for each ob_start() call and when this proves to be insufficient, increase by 10kb each time. Ouch! PHP does allow you to say how much memory ob_start() can use, via 2nd parameter to the function. However, if you exceed that size, PHP will promptly flush the captured data to screen, which means that unless you are really good at predicting your buffer sizes or vastly overestimate, there is a risk that...

My slides for my "Under the Hood" talk at ZendCon are now online and can be downloaded here. Thanks to all the attendees, especially those who left feedback at Joind.In.

I've just released a new version of php-excel extension that exposes the new functionality offered by libxl 3.2.0. The new functionality in this release includes the following: - ExcelSheet::setPrintFit(int wPages, int hPages) that fits sheet width and sheet height to wPages and hPages respectively - ExcelSheet::getPrintFit() that returns whether fit to page option is enabled, and if so to what width & height - ExcelSheet::getNamedRange(string name) that gets the named range coordianates by name, returns false if range is not found - ExcelSheet::getIndexRange(int index) that gets the named range coordianates by index, returns false if range is not found - ExcelSheet::namedRangeSize() that returns the number of named ranges in the sheet - ExcelSheet::getVerPageBreak(int index) that returns column with vertical page break at position index - ExcelSheet::getVerPageBreakSize() that returns a number of vertical page breaks in the sheet - ExcelSheet::getHorPageBreak(int index) that...

The slides from my talk on the Hidden Features of PHP are now available and can be downloaded from here: ipc_2011_hidden_features.pdf Thanks to all the people who attended the talk and I really am looking for your feedback via Joind.in.