Looks promising

PHP Barcelona Conference 2015
I had the pleasure to attend the 2015 PHP Barcelona Conference this weekend and I decided to blog about the experience. The lineup was amazing and included Zeev Suraski, one of the founders of Zend and writer of PHP3, which gave the closing presentation. It was an awesome experience and I can’t wait for next […]

20 years of PHP
It’s been 20 years since Rasmus Lerdorf launched the first version of PHP called Personal Home Page tools. 20 years! Feeling old yet? For PHP’s 20th birthday, Ben Ramsey issued a call to everyone to post how they started out with PHP and tweet the story under the hashtag #20yearsofphp. So here’s mine… Long, long […]
Use foreach with Symfony crawler
I’ve found Symfony’s crawler a very useful tool for parsing web pages, but it had some shortcomings, especially when traversing a list of elements, more to the point, there were inconsistencies between using PHP’s built in foreach and the crawler’s each method. For example:
1 2 3 4 |
foreach ($crawler->filter('li') as $li) { // $li is a DOMNode object // @see http://php.net/manual/en/class.domnode.php } |
as opposed to
1 2 3 |
$crawler->filter('li')->each(function($li) { // $li is a Crawler instance. }); |
I personally prefer the foreach approach, […]

Calling a private method in PHP
When asking “How can one call a private method in PHP outside its class?” the first answer is another question “Why on earth would you need to do that?“. And this time I had an answer: because the method I need to call is declared as private in a 3rd party library that I’m using […]

Moving wordpress to a different domain and update the URLs
As said in the about me page, I’ve just moved my blog from the old URL motane.lu to my new one, tudorbarbu.ninja. Although pretty simple to move use and install, moving wordpress to a different domain is not as easy, as it saves the current domain in the database, in several locations, and manually looking […]

Validate URLs in Zend Framework
I was doing some dev work, as usual in ZF, and I was surprised to find out that there’s no Zend_Validate_Url or Zend_Validate_Uri class among the framework’s default validators. Which is a bit weird, as validating URLs in a very common task in web development, much more common than, let’s say, validating a barcode or […]

Zend_Db_Select and the LIKE clause
This is a post I’ve wanted to write for a long time, perhaps it will be useful to others. It’s about using Zend_Db_Table_Select and the SQL LIKE statement. I remember it giving me some headaches in the past, so here it is: The problem is that Zend’s implementation is a bit counterintuitive, as the % […]
New kid on the block
Meet Cosmin. He’s my dev partner at StoreBeez. He’s a software developer who recently turned to the light side of the Force by making the switch from .NET and other M$ technologies to PHP and open source. While he still uses Windows – which bears testimony of his former allegiance with the evil empire – […]
Paginating randomly ordered SQL results with Zend_Paginate
As some of you might already know, I’m working on my latest project, StoreBeez, which is a virtual mall where independent businesses and artisans can open an online store fast and easy, without having to pay any upfront costs. The products are also displayed on our frontpage. And since I don’t want to promote a […]
Most commented