Tag Archives: PHP

The thin line between an Invocation

PHP language changes and until we understand them. Did this caught your attention? The release of PHP 8.1 is quite some days ago, like November the year before last year, and when I first learned about first class callable syntax … Continue reading

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

An Exquisite Amble through the Realm of Desugaring

Bonjour Confrères and Consoeurs, Ai, Yay, Yay, wish to invite you on a captivating sojourn into the sophisticated sphere of Desugaring. In the lexicon of programming, Desugaring denotes the elegant procedure of translating more ornate linguistic constructs—dubbed as Syntactic Sugar … Continue reading

Posted in Surviving the Internet, Uncategorized | Tagged , , | Leave a comment

Speedpills 4 Linting PHP Files in Parallel

Quite some time ago I’ve already written about linting PHP files in the shell / build. Even though parallel linting is fine, when the code-base is growing larger and larger, the build becomes slower and slower. A slow build sucks. … Continue reading

Posted in Hakre's Tips, PHP Development, PHP Development, Pressed, Scripts, Tools, Uncategorized | Tagged , , , , , | 1 Comment

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

Make any Composer Command Segfault

This is from the shock your co-worker department: There is an easy one-liner to make any composer based project spit “Segmentation fault (core dumped)” regardless of the Composer command entered:

Posted in Bugs and Features, PHP Development, Pressed, Tools | Tagged , , | Leave a comment

History of the PHP date timezone settings warning

Now with the newborn elefant PHP 7 in the herd, there is a lift on the date timezone settings warning: it has just been removed. That means, it’s now that you need to take care in the server’s configuration that … Continue reading

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

Linting PHP Files in Parallel on Travis

With PHP 7 around the corner here is a small tip how you can at least lint the code in your project to be PHP 7 syntax compatible. That allows you to easier obtain forward-compatible PHP code with ease. So … Continue reading

Posted in Hakre's Tips, PHP Development, Pressed, 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

Learning OOP in PHP

Just linked: Learning OOP in PHP

Posted in Linked, Pressed, Uncategorized | 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

PHP turtles – Turtles all the way down

Some nice line-up for the know your language department: PHP turtles – Turtles all the way down.

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

XPath Null Byte Injection in PHP

Back in July this year, in Mitigating XPath Injection Attacks in PHP I was writing about how to properly quote a string in PHP’s Xpath 1.0. The code presented there was based on the assumption that the resulting expression is … Continue reading

Posted in Hakre's Tips, PHP Development, Pressed, Surviving the Internet | Tagged , , , , , , , | Leave a comment

Ircmaxell’s Rambling On Internals

Ircmaxell’s Rambling On Internals raises a very important point about the use of RFCs in the PHP community and the problem they have been introduced as a tool to only negotiate – not solve – the problems of the PHP … Continue reading

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

Greeting, Greetings and the GreetingFactory

Just stumbled over: If you ask Is this correct object oriented programing in php? and then get an answer from Gordon, well, see for yourself. (via)

Posted in Linked, Pressed | Tagged , | 1 Comment

Your Guide to Composer in WordPress and there is WordPress Packagist. I only knew about Composer Installers (incl. WordPress ones) so far.

Posted on by hakre | Leave a comment

The Negative Influence of WordPress on PHP

The current The TIOBE Programming Community Index for July 2013 shows an increase for PHP, gaining grounds fast and as an ongoing trend over the last year: If compared to January 2013, PHP is the fastest climber with an increase … Continue reading

Posted in Hakre's Tips, Linked, Pressed, Surviving the Internet | Tagged , , , , , | 2 Comments

Atomic deploys at Etsy

Atomic deploys at Etsy

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

Mitigating XPath Injection Attacks in PHP

PHP has two libxml based extensions that allow to execute XPath 1.0 expressions: DOM (by the DOMXPath class) and SimpleXML (with its xpath() method). Both extensions are prone to XPath Injection Attacks, a common attack form. Albeit all this, and … Continue reading

Posted in Hakre's Tips, PHP Development, Pressed, Surviving the Internet | Tagged , , , , , , , | 1 Comment

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 , , , , , | 4 Comments

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