minthost.com

Minthost

Established in March 2008, Minthost is a rapidly growing web hosting company. Providing affordable hosting in the UK without compromising speed or customer support.

visit site
localhostr.com

localhostr

With a slick interface and no file type limitations, serving up millions of downloads every month. localhostr provides a quick and easy way to share files with whoever you like.

visit site
scannan.com

Scannan

This project started out as a way of browsing huge movie collections with ease. It uses IMDB for the data and ties in to a remote VLC instance for playback control. It is currently being ported to work inside the VLC Web Interface.

visit site
min.ie

min.ie

A simple link shortening service, there's far too many already out there, but this one's mine.

visit site
versioncore.com

VersionCore

A Final Year Project for University, much of what VersionCore does and will do is under wraps. It's no secret however that it is related to software project management. Under Development

visit site
geska.net

Geska

Geska was a simple blogging engine which started as a project to help learn programming in 2005. It was short-lived but nonetheless accumulated thousands of downloads and 3 years later it can still be found for download on sourceforge.

visit site
28 Jun 09

PHP and stdClass

The built in class stdClass can be instantiated manually for creating generic objects which you can then set member variables for, this is useful for passing objects to other functions or methods which expect to take an object as an argument. An even more likely usage is casting an array to an object which takes each value in the array and adds it as a member variable with the name based on the key in the array.

<?php
$obj = (object) array("foo" => "bar")
echo $obj->foo; // outputs "bar"
?>

One place you might get caught out here is trying to directly access numerically indexed values on the object, this breaks PHP’s naming convention and does not work correctly even with escaping.

<?php
$obj = (object) array("foo"=>"bar","foobar");
echo $obj->foo; //outputs "bar"
echo $obj->{0}; //$x->0 would cause a syntax error, this simply causes a notice for being unable to find the variable.

More Posts »