Tag Archives: php

Trans­lat­ing vari­able strings with get­text or “How to trans­late Doctrine’s enums”

Trans­lat­ing of some­thing with get­text is well-discussed prob­lem, so there’s no need to dis­cuss it again. Everything works like a charm, when you deal­ing with string con­stants. But what to do if you need to trans­late a string retrieved from some vari­able, … Con­tinue read­ing

Posted in Development, Doctrine ORM | Tagged , , , , | Leave a comment

Fast debug someone else’s PHP application

Some­times you need to make a small fix to someone’s code (e.g. you are hack­ing exist­ing applic­a­tion). And unfor­tu­nately 85% times you’ll meet strange bugs. Most of such bugs are because of unex­pec­ted “input”, e.g. you expect that vari­able should be … Con­tinue read­ing

Posted in Development, How To's | Tagged , , , | Leave a comment

Adding thou­sands sep­ar­at­ors to a number

Today Marco shared on his blog an idea how to add thou­sands sep­ar­at­ors on CLI with help of stand­ard printf func­tion, and Perl, and sed, and awk. So I want to extend his post with same thing but in PHP, Ruby … Con­tinue read­ing

Posted in How To's | Tagged , , , , , | Leave a comment

Beware of PHP’s list() function

If you are using list() func­tion with vari­able, like this: $arr = array(‘green’, ‘apple’); list($color, $fruit) = $arr; You should pay atten­tion to the order of vari­ables you assign if one of them has same name as ini­tial array. Else you’ll … Con­tinue read­ing

Posted in Development | Tagged , , | Leave a comment

Another step for free­dom of CRE Loaded PCI Pro

This is a small improve­ment to pre­vi­ously released free ver­sion of CRE Loaded PCI Pro. After I was play­ing with pre­vi­ous release I found that (at least) after upgrad­ing from another ver­sion this applic­a­tion sends an inform­a­tion about your web-site at sales@creloaded.com and … Con­tinue read­ing

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