PHP Output Buffering For Noobies

You might have heard about output buffering while you code in PHP. I will tell you what it is and how to use it simply. “Output Buffering” Meaning “Buffering” in computing means store (data) in a buffer while it is being processed or transferred. This is exactly what PHP does too. But, the default mechanism is not this. It is turned off by default i.e : data is not stored…

Run Multiple WebSocket Services On Same Port

Are you as crazy as me when developing WebSocket applications ? It’s so awesome to work with WebSockets that will blow up your mind and irritate you at the same time. WebSockets can be used for any real time applications such as : Games Chat News File Transfer And because it’s impact is so vast, we can develop as many applications as we want. But, a problem arises for freebies…

Greed – A Short Film

Besides coding, my other passion is film making. I have already made some films since the age of 8. But those were raw footage and I didn’t edit them. When I was 11, I created an another film and edited it with Windows Movie Maker. I didn’t publish it and it still exist in my computer. Now, after 5 years I decided to create another film. This time with the…

How To Install & Run Composer Binaries Globally

Take PHPUnit as an example. You can install it using Composer doing this : composer require phpunit/phpunit This will install a phpunit shortcut in vendor/bin directory. This obviously means you can run it. But, you would have to point to the exact location of the phpunit file to run :  /home/username/mysite/vendor/bin/phpunit phpunit.xml But, that’s long and uncomfortable. And you would have to install PHPUnit separately for each projects. I’m gonna…

Earth Day Special – 21 KMs of Exploration

Today is Earth Day, a special day dedicated to our mother Earth. I didn’t knew about this day until I saw the Google Doodle today morning at 12:15 (around-ish). When I looked it up, I saw the ways to participate in this event : Walk to work, cycle or take public transport Cycle ? That’s my favorite thing besides coding. It’s a way I could relax and exercise without losing…

Doing Random Things in PHP

Suppose you want to display something randomly in a news feed, or pick random elements from an array, or anything random in general. Programming Languages are used to define the way how something must be done. Hence in a technical way, it can’t do things randomly on it’s own. Otherwise it would be an AI (Artificial Intelligence). Doing random things is not done at compiling, but in execution. In case…