In this post, we will go through the process of deep copying a PHP variable in user land (i.e., in pure PHP) step by step, describing the challenges facing every step, resolving them and going forward. (TL;DR: check this Github gist for the final solution) The Challenges There are three particular challenges for solving the deep copy problem in PHP: Some things simply can not be copied (e.g., resources like file handles, and objects like MySQLi instances) References are invisible in PHP. They …
Category: Development
While working on PureTextRender package, I realized some serious limits in PHP arrays. The mentioned package renders text into BMP images using pure PHP (no GD), and for that it …
Stripe is a financial firm, which runs CTF competitions of highest quality. This year, around today (22 Jan) they launched their third CTF, which is based on distributed computing (the …
NOTE: the script is not functional at the moment (due to facebook API changes). I will remove this note once I make a new working version. Update Sep 2014: I’ve …
First of all, Happy Nowruz! Tomorrow is officially the new Jalali year‘s start. Best of wishes to everyone. The Problem I’ve been working on an elegant design for a new …
Bloating is one of the most fatal horrors that can happen to a piece of software. It is when you have a nice working software that everyone loves, and then …
Qt is a rather magnificent and silent framework. Every application I tend to find amusing and well developed, is based on Qt, but nobody really knows that. There’s not much …