Hello everyone, I am Rick and I am glad to have found such a nice and interesting forum.
I am doing some maintenance to a web server, updating XAMPP to the latest version (32–>64bit, php 5.6–> 7.4, latest MariaDB).
This server houses a web application that was coded by an ex colleague. It was written using php5 and () some functions which were at that time already deprecated and now gone in php7.
The function no more present is split(), and it is used within a custom funciton to get unix time using the microtime() function.
The following getmicrotime() function is present on many php files, therefore it breaks the web app as it is not compatible with php7.
<?php
function getmicrotime() {
$temparray = split(" ",microtime());
$returntime = $temparray[0] + $temparray[1];
return $returntime;
}
$starttime = getmicrotime();
How can I recode this funciton to maintain it while abiding to php7? How can I use the explode() or preg_split() associated functions to recode it?
Thank you very much in advance!