Whereas PHP’s main usage is to generate web pages, it can also be used as a scripting language in your shell (just like bash or python). To that purpose, you can use the CLI version of PHP (CLI standing for Command Line Interface).
The purpose of a CLI script is different, it’s not to g ...
Today, I’m taking the time to talk about my new project, Forexagone.com. It’s a website (in french only so far) whose aim is to teach Forex to very beginners, in a way it has not been done before. We really make Forex easy to learn for beginners, who can really start from the very beginn ...
My motivation in writing this proposal comes from years of PHP practice, when I had to use other people’s code and their code looks like garbage so much that I wanted to throw it to the their face rather than using it. I can’t expect everybody to write clear code, but if I could turn the ...
Charset issues is something that always made me go mad. And since I’m french and I’ve designed many french websites, it’s something I couldn’t escape, thanks to all these special chars we have in our language
Well, today an issue came up with the strtolower function. Look a ...
With hindsight, there are things that are definitively not obvious to me when I started to design my first WordPress theme, things which are not very well explained in the official documentation. To begin, be aware that WordPress theming is everything but beautiful coding: no OOP, no MVC, no respec ...
It was on my todo list for a while: “code a URL shortener“. And yesterday, I don’t know why, I decided it was the day to definitively check this line off. Here is the story of a guy who wanted to code a service in one small afternoon.
tldr: it took around 3 hours to code it all (i ...
This week, I had to set up and configure an nginx server for the first time. If there is something that I think is essential for a web server, it’s to clearly separate the environment of each of the websites that run on it. Especially, when you execute PHP (or whatever) scripts on your website ...
Recently I had to develop a chat room system very quickly. I absolutely wanted to use my favorite language: PHP. So I had to figure out how do sockets work in PHP, and how to give PHP a daemon behavior (read: Give PHP a daemon behavior).
I found many resources on the Internet, more or less exact, m ...
Well, I fully admit PHP is not the best language to write daemons, because of all the performance issues we all know, and infinite loops are not the most beautiful thing you can see in a procedural script. However, it may happen that for a reason X or Y, you want to use PHP to write daemons (it has ...
It may be necessary to sort a dataset after a SQL request. And in a general case, I prefer using this function instead of dealing with the ORDER BY and LIMIT clauses.
So I wrote this method (which is part of my Utils class, in my own framework):
(more…)
...