Quantcast
Channel: Squirrel Hacker » Object-oriented programming
Browsing latest articles
Browse All 4 View Live

Image may be NSFW.
Clik here to view.

Making isset Recursive

At work I was told to add in the magic method __isset() (which is technically done by overloading the function…). Essentially it lets you call isset() on private and protected variables in your...

View Article



Image may be NSFW.
Clik here to view.

Damn-it PHP

Run this, I will wait <?php $items = array('name'=>'blah1', 0=>array('blah2')); $name = 'name'; foreach($items as $key=>$value){ var_dump($key); var_dump($name); var_dump($name==$key);...

View Article

Image may be NSFW.
Clik here to view.

Documenting PHP Code

I know we all hate documenting code, but it can really help out future you or me when we need to go back and fix something. Poorly documented code is the bane of anyone who will be taking on your code...

View Article

Image may be NSFW.
Clik here to view.

Orms and Circular References

In my spare time I have been working on an ORM… not one meant to be used in the real world (well… not yet anyway). I currently have hasOne and hasMany working like so: <?php   /** * @property int...

View Article
Browsing latest articles
Browse All 4 View Live




Latest Images