Troels has been crafting web applications, as a freelancer and while employed by companies of various sizes, since around the time of the IT-bubble burst. Nowadays, he's working on backend systems for a Danish ISP. In his spare time, he develops and maintains Konstrukt, a web application framework for PHP, and is the organizer of a monthly PHP-meetup in Copenhagen.
Use Webkit and Imagemagick to Create Cross-browser Buttons and Other Swag
For this tutorial, I’ll show how you can render the well known super awesome button into a sprite that can be used in most current browsers and look just as good as they do in webkit. You can use the technique for a lot of things, such as boxes and borders etc.
pearhub.org provides a place where you can register a project, that is hosted on Github, Google code or similar.
A Note on Google’s So-called Best Practices
The advice for PHP developers in Google’s recent “make the web faster” campaign are plain wrong. Troels tackles some of the tips and provides some words of wisdom on how to really optimise your site’s performance.
Introducing Bucket: A Minimal Dependency Injection Container for PHP
Troels got fed up with the lack of a decent Dependency Injection container for PHP, so he did what any diligent programmer would do … he built his own. Check out Bucket, released today as an open source package.
Interactive CLI password prompt in PHP
Just a quick tip, since I spent a good hour figuring this out recently. PHP has no native way of doing an interactive password prompt, when running as CLI. You can however use bash for the task. Of course this means that it won’t work on Windows, but you should be fine on most anything […]
Flowing Markdown Upstream
Markdown is one of the most popular alternatives to writing markup — partly because it’s easy to understand for non-technical users. Here, Troels introduces an implementation that includes a live preview.
On $_GET and $_POST
Troels Knak-Nielsen offers some thoughts about the naming of $_GET and $_POST and general HTTP confusion.
php-tracer-weaver is a tool for automatically generating docblock comments, with parameter types.
How to Expose PHP’s Private Parts
I’ve been tinkering with dumping PHP objects, and have found myself constantly running into a brick wall. The output from print_r and friends is fine in some contexts, but for larger structures, it would be nice to tidy the output up a bit and wrap it in some HTML.
DOM vs. Template
Fredrik Holmström recently posted a small template engine, based on DOM-manipulation. While there are certainly a lot of template engines around, I find this approach interesting. The concept is simple enough; The template is parsed into an object model (DOM), and then values can be assigned to these through PHP code. The main difference to […]