Category Archives: Developing

Using Assertions with (Legacy) PHP Code

While it was not much advised to use assertions (the assert PHP language construct) prior to PHP 7 due to the fact that it actually eval’ed a string’ed code, these days are gone. This is probably a lesser known fact with … Continue reading

Posted in Developing, Hakre's Tips, PHP Development, PHP Development, Pressed, The Know Your Language Department, Tools | Tagged , , , , , , , | Leave a comment

The SimpleXMLElement Magic Wonder World in PHP

PHP’s Simplexml ships with a lot of magic to simplify access to an XML documents element and attribute node values. Some criticize this and suggest to use the DOM library instead. The DOM library on the other hand, even it … Continue reading

Posted in Developing, Hakre's Tips, PHP Development, Pressed, The Know Your Language Department, Uncategorized | Tagged , , , , | Leave a comment

Hide Folders in PhpStorm Project Pane

How can I hide a directory in a PHPStorm project, for example .sass-cache I just asked myself this morning. Searching online didn’t reveal it to me and there are numerious options that were close but not about hiding the directory … Continue reading

Posted in Developing, Hakre's Tips, Pressed | Tagged | Leave a comment

Commandline Source Fixes Foo

From time to time I need to cleanup source trees. Today I needed to do that again, here are some command liners to get some work done. If you’re on Windows, all you need to do to get these running … Continue reading

Posted in Developing, Hakre's Tips, Pressed, Tools | Tagged , , , , , , | Leave a comment

Composer Clear Cache

It’s one of the best kept secrets of popular PHP dependency manager Composer: How to flush composers cache. You normally don’t need it, however if you create some composer.json and you want to put it to a test, this can … Continue reading

Posted in Developing, Hakre's Tips, PHP Development | Tagged , , , , , | 5 Comments

SimpleXML and JSON Encode in PHP – Part III and End

The previous two parts (Part I; Part II) did outline PHP’s standard behaviour when JSON encoding a SimpleXMLElement with json_encode(). As outlined this does not always fits the encoding needs and for some potential problems some workarounds have been showed. … Continue reading

Posted in Developing, PHP Development, PHP Development, Pressed, Tools | Tagged , , , , , | 1 Comment

SimpleXML and JSON Encode in PHP – Part II

In the previous post (Part I) I was giving a little overview for common woes turning a SimpleXMLElement into JSON when XML structural information is available that JSON is not capable to encode easily. The explanations given there were intended … Continue reading

Posted in Developing, PHP Development, PHP Development, Pressed, Tools | Tagged , , , , , | 2 Comments

SimpleXML and JSON Encode in PHP – Part I

With SimpleXMLElement it is often easy and looks like a very quick way to turn some XML into JSON. But not everything in PHP that has an easy interface works out of the box. In this three part series I’ll … Continue reading

Posted in Developing, PHP Development, PHP Development, Pressed, Tools | Tagged , , , , , | Leave a comment

PHP: XPath on HTML and XHTML

Christan Weiske has published a nice summarizing article with the same title. It contains some detailed information I haven’t found so far on the web so worth the link: PHP: XPath on HTML and XHTML. It also reminds me of … Continue reading

Posted in Developing, Hakre's Tips, PHP Development, Pressed | Tagged , , , , | Leave a comment

The Greatest PHP Value

Just two days ago I asked a PHP-quiz-question in the chatroom on Stackoverflow, something along the lines: PHP: Which one is greatest? PHP has a comparison operator to compare if one value is greater than the other (>). Which one … Continue reading

Posted in Developing, PHP Development, Pressed, The Know Your Language Department | Tagged , , , , , | Leave a comment

Getting N Random Elements out of an Iterator – RandomIterator

Considering there is an Iterator or Traversable with an unknown number of elements, I wondered if it is possible to get one or more random iterations out of it.

Posted in Developing, Hakre's Tips, PHP Development, Pressed | Tagged , , , , , , | Leave a comment

Getting the Vagrant in the Box (Fedora 17)

This post is about installing a useful development tool to play with systems and configurations in a virtualized environment on your fingertips. Want to test your WordPress with a completely differnt web- and database server? Maybe running a proxy in … Continue reading

Posted in Developing, Hakre's Tips, Pressed, Tools | Tagged , , , | Leave a comment

Using the SPDX License List for Tagging and Linking

The Software Package Data Exchange® (SPDX™) specification is a standard format for communicating the components, licenses and copyrights associated with a software package. Their website has a lot of detailed information about the specs, format and tools itself. But in … Continue reading

Posted in Developing, Hakre's Tips, Licensing, Pressed | Tagged , , , , , | 2 Comments

jQuery afterText Plugin

jQuery has a hard time dealing with text after something you’ve selected. But now it’s easy thanks to the jQuery afterText Plugin. Just change the text after something with the afterText() function: The difference to after(text) is that afterText(text) replaces … Continue reading

Posted in Developing, Linked, Pressed | Tagged , , | Leave a comment

EllisLab: Copyright not by work but per File

In their run for re-licensing the CodeIgniter codebase under OSL (which in itself looks violating the shared authorship copyright as a whole as it has not yet been clarified with all authors and copyright holders in concrete), in a blog … Continue reading

Posted in Licensing, Linked, Pressed | Tagged , , , , , , , | 1 Comment

Introducing: PasswordLib

Ircmaxell is Introducing PasswordLib, a PHP library for password hashing. It’s a spin-off from CryptLib which didn’t finish so far. Github; Packagist. MIT License.

Posted in Developing, Linked, PHP Library, Pressed | Tagged , , , , | Leave a comment

Iterating over Multiple Iterators at Once

PHP’s SPL has two build-in Iterators that deal with multiple iterators at once: AppendIterator and MultipleIterator. In this posting I’ll cover both a bit: AppendIterator will put one iterator after the other so it get’s like a long queue or … Continue reading

Posted in Developing, Hakre's Tips, PHP Development, Pressed | Tagged , , , , , , , | 1 Comment

CSS Selector to XPath conversion

While playing with a parser experiment that fully supports the CSS selectors syntax and the discovery of the Selectors API I started to think about the transformation from CSS selectors to XPath. Sure I’m not the only one, so I … Continue reading

Posted in Developing, PHP Development, Pressed | Tagged , , , , , , , | 1 Comment

Some PHP Iterator Fun

I must have had too much free time. Over at Stackoverflow some kind of PHP question pops up from time to time about how to distribute a sequence of data in form of a table or in columns. You already … Continue reading

Posted in Developing, Hakre's Tips, PHP Development, Pressed | Tagged , , , , , , , | 1 Comment

Architecture the Lost Years (Robert Cecil Martin; 4 Nov 2011)

Did worldwide Hypertext turned software developers out in the field upside-down? In Architecture the Lost Years (1h 06m) Robert C. Martin talks about the web and how it influenced development design decisions in the last decade(s). Is the system the … Continue reading

Posted in Developing, Hakre's Tips, Linked, Pressed, Surviving the Internet | Tagged , , , , , , , , , | 1 Comment