Musings of a PHPDiversity Rainbow Elephpant

I’m reminded that it has been quite a while since I last posted anything here on Mark’s blog site, and that people might be forgetting about me… but an Elephpant never forgets. I’m still in a fever-pitch of excitement, as I have been ever since I first saw those photographs of the real me. But Elephpants are also patient: when Mark was originally talking about a kickstarter to help fund me into reality, he was expecting it to happen around October. Then the first photographs of me were sent from the factory in China, and he was hopeful that the timescales could be brought forward; but things do seem to have been moving slowly over the Summer, so it’s likely that it will be in October. However, whether it’s in September or October, it is certain that it will be going ahead before very long. All the costings are looking good so far

In the meanwhile, I’ve been keeping myself occupied playing Pokemon Go, and watching the Olympic games. “Citius, Altius, Fortius”, “Faster, Higher, Stronger”… you humans can really achieve quite incredible feats of skill, agility, power and endurance.

Continue reading

Posted in PHP | Tagged , , | Leave a comment

Musings of a PHPDiversity Rainbow Elephpant

“A week is a long time in politics”, apparently. I’m not sure what that means: every time I’ve asked Mark over the last week or so, he’s been reduced almost to tears, mumbling something about “being proud to be a European”, but “no longer allowed to say so out loud”.

But what I do know is that a lot can happen in just one week; and a lot has been happening here, as Mark starts to put together costings and estimates in spreadsheets. The pictures that I posted last week show that it’s technically feasible to create me as a real Elephpant, and prove that there will always be at least one of me. Now he’s putting some numbers and costings together to show whether or not I’m financially viable; and he tells me that it’s all looking good so far, though he needs some more numbers to be certain. And it will need at least 1,200 of me to work, because that’s the minimum run that the factory will do; but I shouldn’t cost much more than any of the other Elephpants out in the world, despite the extra overheads of the colouring process.

That’s all very good news for me. It’s important that there are lots of me all around the world, spreading the Diversity message wherever they find themselves.

Continue reading

Posted in PHP | Tagged , , | Leave a comment

Musings of a PHPDiversity Rainbow Elephpant

Mark’s away at the Dutch PHP Conference where (apparently) he’s talking to people about cats; but while he’s away, I’ve had the most incredible, incredible news. It’s really been a very busy day here.

Not only is there a new PHP User Group in Denmark, PHPJutland, that’s only just been announced today – waving “hello” to all my new Danish friends; and I have a new cousin to welcome to the family of Elephpants; but I’ve also seen the real me… I mean, I haven’t actually seen the “real” me yet (my eyesight isn’t good enough to see half way round the world, and the real me is still at the factory in China), but I have seen photographs of the real me, and that’s nearly as good, because it means that a real me now exists in the real world. I am now officially a prototype!

And I’m so excited about seeing me for the first time ever, that I just have to share some of the photographs with you all to show you what I look like.

Continue reading

Posted in PHP | Tagged , , | 2 Comments

Musings of a PHPDiversity Rainbow Elephpant

Wow! Mark is letting me write my own posts on his blog.

For those of you who don’t know me yet, I’m Enfys, the PHP Diversity Rainbow Elephpant; or at least, I shall be when I’m real. At the moment, I’m just a virtual Elephpant, an idea inpired by a photoshopped picture by  Peter Kokot (a Slovenian developer); but someday soon I hope to be a real Elephpant, and join the PHP worldwide herd.

And yesterday, my dream came a step closer to reality.

Continue reading

Posted in PHP | Tagged , , | 2 Comments

The PHP Diversity Rainbow ElePHPant

It was a picture posted by Peter Kokot (a Slovenian developer) on the PHP group on Facebook that got me thinking.

Diversity Elephpant

Together with his comment:

Hello, PHPers. A friendly reminder to spread awareness and support of equality because discrimination separates us. Today is the International Day Against Homophobia, Transphobia, and Biphobia.
Let’s not discriminate based on the race, gender, sexual orientation, gender identity, age, nationality, religion nor technology. Have a nice day.🙂

Continue reading

Posted in PHP | Tagged , , | 1 Comment

Anonymous Class Factory – The Results are in

A week or so ago, I published an article entitled “In Search of an Anonymous Class Factory” about my efforts at writing a “factory” for PHP7’s new Anonymous Classes (extending a named concrete base class, and assigning Traits to it dynamically); and about how I subsequently discovered the expensive memory demands of my original factory code, and then rewrote it using a different and (hopefully) more memory-efficient approach.

Since then, I’ve run some tests for memory usage and timings to assess just how inefficient my first attempt at the factory code was, and whether the new version of the factory really was better than the original.

Continue reading

Posted in PHP | Tagged , , , , , , | Leave a comment

In Search of an Anonymous Class Factory

One of the more interesting new features introduced to PHP with the arrival of version 7 is Anonymous Classes. Anonymous Functions (or Closures) have been a part of the language since version 5.3.0, and are something that I find incredibly useful; but (aside from a few very specific circumstances) I couldn’t see any real everyday benefits for coders (other than perhaps a few library developers) in Anonymous Classes.

Then back in January (as I was waiting for my flight to the continent for PHPBenelux) I was intrigued by a request to find a way of dynamically applying Traits to a class at run-time. With time on my hands as I was sitting in the airport, I considered the problem; and my first thought was to build an Anonymous class, extending the requested class (so that it would still contain all the base properties and functionality, and could be type-hinted, but also applying the requested Trait or set of Traits.

Continue reading

Posted in PHP | Tagged , , , | 10 Comments