Quantcast
Channel: PHPDeveloper.org
Viewing all articles
Browse latest Browse all 2

DevShed: Enforcing Object Types in PHP - Using the Type Hinting Feature in PHP 5

$
0
0
DevShed has posted the last article in their "Enforcing Object Types in PHP" series today - "Using the Type Hinting Feature in PHP5".

[Returning] to the subject of this last tutorial, I'll introduce another method for enforcing object types in PHP 5: the "Type Hinting" feature. It can also be used in conjunction with the "instanceof" operator that you learned about before, in order to develop PHP applications that implement thorough routines for filtering unwanted objects. Generally speaking, when you finish reading this article, you should be armed with a few more methods for forcing object types in PHP, in this way expanding your overall knowledge of object-oriented programming.

They start with an introduction to type hinting and some basic examples of its use. From there, they build up a relevant example with the help of their (X)HTML widget class they've used throughout the series.


Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles





Latest Images