Opensource: be grateful for enterprisey mess

Apparently, it has taken almost a year for the most popular PHP mailing library to support TLS v1.1 and v1.2 !? https://github.com/swiftmailer/swiftmailer/issues/933 (Packagist says it is downloaded almost 73 million times! https://packagist.org/packages/swiftmailer/swiftmailer) … only after PHP geeks freaked out, started screaming, running like headless chickens (online), including me, maybe because some paranoid security guys turned … Read moreOpensource: be grateful for enterprisey mess

How NOT to write (OOP PHP) code

My comment on one of the files of SuiteCRM: https://github.com/salesagility/SuiteCRM/issues/3561 which was closed and kindly “put” aside (IGNORED basically!): https://trello.com/b/Ht7LbMqw/suitecrm-suggestion-box So… Expected Behaviour It has to extend/implement only SugarBean and some relevant functions. Many functions must be implemented by separate classes esp. email management functions related to POP3 and IMAP so that we can maintain … Read moreHow NOT to write (OOP PHP) code

How NOT to write (PHP) code

My comment on one of the files of SuiteCRM: https://github.com/salesagility/SuiteCRM/issues/3687 So… * todo: encapsulate logically related code into separate classes — e.g. use (API) controller class(es) — contact management API — folder management API (create, rename, delete, etc.) — email management API (read, compose drafts, send, relate to other entities etc.) — signature management API … Read moreHow NOT to write (PHP) code

The cost of a million objects – revisited for PHP7

PHP 7 is out there finally and I am sure the adoption rate will be very slow especially because of legacy code. Here is a repetition of my simple tests I’ve done before (PHP Memory Usage: The cost of a million objects) and comparison of those results between PHP 5.6.18 and PHP 7.0.3. path-to-php5/php.exe test-path/memory_test_v4_objects_with_myclass_simple.php … Read moreThe cost of a million objects – revisited for PHP7

PHP: The cost of a million objects on function calls

Especially, if you are a start-up, all it takes is a fine combination of: a bad coder (with an arrogant attitude of “code first + optimize later”) and 1000 simultaneous requests to bring each of your servers to its “knees”. On part 1, I’ve mentioned the cost of a million items when we are using … Read morePHP: The cost of a million objects on function calls

PHP Memory Usage: The cost of a million objects

Even though memory is getting cheaper, our applications are becoming more complicated and we need to write our code more carefully. I’d like to share some surprising tests I’ve written recently. The sample code files are also on github: https://github.com/muratyaman/php-tips. The tests are very simple: let’s create an array of million items to process: version … Read morePHP Memory Usage: The cost of a million objects

WHAT HAS CHANGED SINCE PHP 5.5.3?

A LOT! From: http://www.charliebaird.co.uk/bugs_2000.htm Bugs are not always cute. So, we need to upgrade all software applications we use on a regular basis. Ref: php.net/ChangeLog-5.php Version 5.5.22 19-Feb-2015 Core: Fixed bug #67068 (getClosure returns somethings that’s not a closure). Fixed bug #68925 (Mitigation for CVE-2015-0235 – GHOST: glibc gethostbyname buffer overflow). Fixed bug #68942 (Use … Read moreWHAT HAS CHANGED SINCE PHP 5.5.3?

PHP says “Nooo” to my integer

Another eye-opener from PHP is the unexpected behaviour of integer filters. Here is a test case class checking “01” and “10” whether they are integers or not.

Refer to: http://php.net/manual/en/filter.filters.validate.php

PHP is dying faster because … (part 2)

PHP 5.0 was released in July 2004. Almost 11 years and we know that they gave up on PHP 6.0 🙁 In IT world, that is a massive failure and a huge embarrassment! Think for a minute: thousands of “genius” developers working together to improve PHP itself, rather than creating another bloody framework!!! How would … Read morePHP is dying faster because … (part 2)

PHP is dying faster because … (part 1)

PHP was well-known for its speed of development (no compilation or formal build process); even for developers from alien worlds like Java esp. when developing prototypes; because it was easy to learn, develop and deploy on almost any platform. I have been coding for almost 18 years now. I picked up PHP as a natural … Read morePHP is dying faster because … (part 1)