Deep Tech Point
first stop in your tech adventure
January 28, 2021 | PHP

You might get into a situation where you need to hook some PHP function. There are many reasons why you might need to do that. One of the most obvious cases is debugging. In PHP it is really easy to hook any function using override_function which overrides built-in functions. However, these simple “hacks” are practical only in conditions when you’re dealing with your own code or some relatively simple code you can change with ease.

In a more complex situation, like if you need to hook the PHP mail function without messing with some third-party source code you need to do it a bit differently.

January 27, 2021 | Javascript

Recently I’ve been running into problems trying to save JSON in the MySQL database. Even though MySQL supports JSON type for a while now, there are still plenty of gotchas while you work with it. The situation is pretty critical with special characters. This time we are going to be short and on the topic of invalid JSON characters.

January 18, 2021 | PHP

You could come into a situation where you are dealing with HTML special characters in some text. Ordinary users might not even notice these special characters exist because when they take a peek at a text in a browser these characters look exactly like normal characters do. However, if you – an advanced user – take a look into the page source, you’ll notice some very unusual presentations, (&amp; for &, &quot; for “, &lt; for <, &gt for > and so on). So, the question is – how do you convert this mumbo jumbo to normal characters?

January 9, 2021 | PHP

As you probably know it’s possible to install multiple versions of PHP on one server. For web servers, simply define which PHP version you want to use in your server’s configuration file. But how to do it for PHP cli?

January 6, 2021 | WordPress development

Since WordPress version 5.0, a new content editor with code name Gutenberg was enforced over the old one which was called Classic editor. Gutenberg editor, also known as Block editor, introduced a new way of formatting content. It supposed to simplify the already simple process for adding content so for some people, including me, it is just an overhead. Perhaps total beginners will enjoy its “helpfulness” but this tutorial is obviously not for them. So let’s see how to remove the new WordPress editor, including its CSS.

remove_gutenberg_and_bring_back_classic_editor();

January 2, 2021 | PHP

PHP can sometimes be confusing when it shouldn’t be. One area of confusion is the issue with “duplicate” built-in functions. I’m always inclined to think that language makers probably had a good reason to make duplicates and most of the time that is a good assumption.
But is it always true? Let’s see an example of echo end print functions. Technically speaking neither echo nor print are functions but language constructs so you don’t need to use parentheses with its arguments.

<?php
echo "get ready: ", 1, 2, 3, " go";  // outputs get ready: 123 go
print "get ready: 123 go";  // print can't handle multiple arguments like echo
?>

December 29, 2020 | WordPress development

Since WordPress released version 4.7.0. developers can connect the third-party apps with the backend core through a REST API endpoint. This was really great news for developers that marked a new level of WordPress platform usability. Version after version WordPress team ironed out the REST API imperfections, fixed bugs, and added missing features such as different authorization methods. Everything is great – for developers – but what about all those WordPress users that don’t need API? Well, they might need it sometime in the future and it’s there without an easy option to turn it off. The unused feature almost always introduces costs in resources and potential security concerns so let’s see how we can cut it out of our WordPress installation.

December 25, 2020 | Learn programming

Is that the right question every new aspiring programmer asks? Or should ask. Well, I was the programmer that didn’t ask himself that question, and from where I stand now it was the first mistake of many I made throughout my career. I started programming on an old VAX minicomputer (in reality not so mini) through one of the many terminals in the university’s computer center. At that time C was the alpha and omega of all programming languages and the answer to the question above was obvious. But today, almost 30 years later, the answer might be quite different.

// C language example
#include <stdio.h>

int main()
{
   printf("Hello World!");
   return 0;
}