Why have the developers of PHP chosen to create a huge list of functions when each of these functions could be represented by a smaller number of functions distributed through an object model?
It seems to me that many of the functions are rather unnecessary as they could be consolidated into a single operation.
Example:
Image functions in PHP could be called from the IMAGE object. Hypothetically, something like this...
$obj = new Image;
$obj.Vsize = 200;
$obj.Hsize = 200;
$obj.BorderStyle = "Rectangle";
$obj.BorderWidth = 0;
$obj.Create("myjpeg.jpg","JPG"
$obj.Render
The above example instantiates the Image class into the object and, through properties, set individual characteristics of the image. Then, create the image from the JPG file and render the image to the browser.
PHP has several completely different sets of functions to deal with database programming. Why not unify it like ADO or DAO?
This code seems much simpler and efficient than a pool of functions.
For the past three years I have been a busy Microsoft Access developer. So, I am used to working with the various object models that Microsoft had exposed (ie. ADO, DAO, etc). Making the transition to PHP has been great. I like to code PHP pages. I just thought I would give my perspective on this issue to see the response.
Gary
gwinn7
A+, Network+