I’ve heard things come in threes so curious whats next because 2 big updates this week are out. Now unfortunately the one that matters is unlikely to gain as much attention as the one that doesn’t mean anything. So lets begin on what folks are focused on…something that means nothing.

MOZ Domain Authority 2.0

Moz redid their Domain Authority calculations and the implications are HUGE for those who work at Moz. If you don’t work there then its not a big deal. Domain Authority is like a fake credit score. Your bank will likely use your FICA score but no one can release your FICA score to you but FICA. To solve this banks and other organizations created their own scoring systems that attempted to mimic your FICA score that they can give out to you on credit monitoring sites. These numbers though aren’t really that important as they are guesses to what your FICA score should be…VantageScore for instance gives a person a score based on their credit history thats also 3 digits but it isn’t a FICA score. If you bank uses FICA scores who cares what your score is at VantageScore.

Moz made up Domain Authority and Google doesn’t use it. So a change to calculating Domain Authority from Moz does not mean a change in search engine ranking. Domain Authority is useful to you because it’s an educated guess as to what Google thinks just like Citation and Trust Flow are guesses by Majestic.

I don’t know about everyone else but the new calculations vastly changed the impression some would have of several domains I operate. Here are some examples:

Moz DA April 2019 – March 2019 – Backlinks

So am I upset that Ultimateseo.org lost 5 points? No. Cause its like it lost 5 Matt Dollars …. But Matt Dollars don’t matter and NEITHER DOES Moz Domain Authority.

But again, Domain Authority has value when used among multiple other metrics geared at assessing a site’s rank ability.

PHP 7.3 Released And Available To Cpanel Servers

Its out and you can now run your site on it if you’re using Cpanel/WHM servers. Im focused on Cpanel because its highly popular …. unless you use Wix or Shopify which use propreietary server management software that isn’t an industry standard. Now, likely you don’t even use 7.2 as many sites still operate on PHP5.6. BUT here are the advantages of 7.3

Is PHP 7.3 faster than PHP 7.2? Should I use PHP 7.3 for my WordPress site? We have done our own performance testing for WordPress running with WooCommerce and benchmarked PHP 7.2 against PHP 7.3.

We installed a standard WordPress 5.0 with the Storefront theme and imported the 50 products supplied by WooCommerce as sample data on a standard Servebolt High Performance plan.

We wanted to test whether PHP 7.3 was performing better than PHP 7.2, and therefore bypassed the reverse proxy and ran tests directly against the backend web server running the PHP, effectively bypassing all caching. The tests were run from the server to eliminate network bias.

We used ab as the testing tool, running 3 000 requests with a concurrency of 1000, with keep alive enabled. ….

We did a few more compiles of PHP 7.3, and tested benchmarked those. We also did benchmarks on all major versions from 5.6 and up. See the results in the table below.

Techy Stuff In 7.3 Update

JSON_THROW_ON_ERROR

Not having an adequate way to handle errors when using JSON has been a problem for quite a long time, and web developer all over the worlds have seen this as a huge downside of the language,

The RFC of PHP 7.3 has accepted this update by a 23 vs 0 vote which says how much this feature has been requested.

Until PHP v7.2 we needed to use a workaround to get an error from JSON and it was not reliable nor proficient in its job;

The new flag I am about to show you is an excellent alternative because give to the programmer the opportunity to use the power of exceptions that can be managed within the “try-catch” block of code.

Is_countable

A countable element in your code can be a variable with an array format or an object whose class is implementing the Countable interface.

Last year PHP 7.2 added a warning that shows up whenever the web developer was counting or trying to loop an uncountable element.

It is possible to solve this problem and one of the best solutions currently used is to apply a check like a snippet below:

The code checks whether the variable is an array or is an instance of the Countable interface.

And it will work but it seems a little bit “crowded” and as many of you that work long hours, after a while seeing this kind of lines wear your eyes out.

The team that is developing the new version took account of this and added a new function that will help the web developer immensely.

The is_countable function takes a variable as a parameter and then return a boolean depending if the function is countable or not.

There is no restriction about the format the parameter has to be, of course, if you put a non-countable variable the return will be false.

array_key_first(), array_key_last()

As per version 5.6 of PHP, there are over 75 built-in functions that belong to the arrays’ category.

Despite the vast numbers of tools available, at the moment, if we need to retrieve the first or the last key of an array we have to get all the keys using array_keys() and only then go for the first or last values of the array.

Another way is to opt for end() or reset().

As you may know, all the methods just described modifying the array pointer, which is something that (other than be resources consumer) you just may not want to do.

The RFC of the upcoming version proposed the introduction of 4 brand-new methods the were set to solve this issue.

The four methods were:

array_key_first()

array_key_last()

array_value_first()

array_value_last()

Among the four of them, only the one set that fetches the keys were accepted with 18 to 14 votes.

They work for both numeric and associative arrays.

The same would have worked for the other two functions illustrated in this chapter array_value_*

Just to be clear, let me repeat,

Those functions have been refused with 18 no and 15 yes.

In my opinion, these two functions would have been useful as well but according to several web developers, in certain cases, the value returned would have been ambiguous.

Here is why:

An additional option that I come across browsing on forums and talking to other web developers was to return a tuple like [$key => $value].

Even though this option will not be available on the new version, seeing the favourable responses, it might arrive with the following RFCs.

Since this is a function that did not exist before there are not going to be any backwards compatibility problems, the only issue could arrive if you have created and you are using your own version of array_key_first() and array_key_last().

Same site cookie

Deploy secure application must always be the main focus of every programmer.

One task that each of us is facing of daily basis it to diminish the risk of CSRF and information leakage attacks.

Same-site cooking declares that cookies must be sent only with request initiated from the same domain.

This is not an official standard but Google Chrome and several of the best PHP frameworks already implement it whereas Firefox and new version of other frameworks confirmed that they are planning to do so.