PHP & More

A technical blog about programming in PHP and about technology in general: programming, workarounds and troubleshooting

Before you upload an internet site, you better test it on your local machine. To do that, you should allocate an IP address known as a loopback address that does not require a modem for access. If you’ve installed Apache Httpd server, you’ll probably get an HTML page that reads “It works” upon connecting to …

Continue reading

One thing I wish to see in languages such as PHP is to find them supporting the complex type. Complex numbers are more than vectors in 2D, and I wish to see expression containing them parsed just like the ones with real numbers. Python supports them, and you have to import ‘cmath’ to use functions …

Continue reading

When you see a change in the major version (the number before the first point of the version id), expect a great leap. New features have been added to PHP in version 7, that make programming more convenient. I’m going to discuss some of them. Null Coalescing Suppose you’re trying to get a value from …

Continue reading

I remember that little prank from the days I was a student. You work on an X terminal, and out of the blue, all the display contents gradually disappear’ Pixel after pixel turns black. But don’t worry – you’ll regain control over your display shortly. shortly. Everyone can access other X terminal display, and mess …

Continue reading

I have received by e-mail a rotated video in the ‘flv’ format. The video was supposed to be a vertical one, but it turned out to be horizontal, that is ROTATED. So, I wrote a little program to rotate it back using libming. There are two things to take care of when processing the input …

Continue reading

D3 is a JavaScript framework used for data visualization. Learning how to work with D3.js is very easy. If you begin with the basics, you’ll see how easy it is to use D3, because: the DOM function names are much shorter than those in the legacy DOM library. the same functions are used for both …

Continue reading