Signup SI EN
IBLOC 2005 Pictures from conference and presentation slides available
IBLOC 2005 About Press Sponsors

Receive latest news!
IBM
Najdi.SI
www.f-secure.si Astec d.o.o.
TRENDNET
Klik
JAPTI
http://www.racunalniske-novice.com
DELO

IBLOC 2005


Preparation of modules for PHP
Janez Resnik, Hal Interactive d.o.o.
The most typical reason to implement an extension module for PHP is a need to use some shared library (libgraybox.so) from PHP script. This excursion into the C code on Linux exposes some secrets of PHP that would probably remain hidden otherwise. How variables and constants work? What types of variables are there? What in fact is an "array"? How does a "resource" work? What is an "object"? "Multipurpose" programmer will discover a lot of similarity between COM (VB) type Variant and variables in PHP.

The first and probably the most important decision is whether to implement an object interface or classical interface to the library. Both ways enable us to effectively solve any problem and with good knowledge of types "object", "array" and "resource" the decision becomes a lot easier. The two representative examples of extension modules are Ming, which uses an object-oriented interface, and MySQL, that uses a classical interface. Why wouldn’t we choose an object solution?
RSS Feed | HOME | INFO | © Copyright ISG d.o.o. 2005