php converter
php converter
how best to convert code from PHP 5 to PHP 7 version?
Re: php converter
set up two local servers, one with PHP 5, the other with PHP 7. Set each localhost to connect to another LocalHost with a different PHP version. Write the code in the old php version, so it would be possible to call it in the new php version. This is how you can migrate data step by step.
There are various PHP5 to PHP7 converters, unfortunately they do not give reliable results.
There are various PHP5 to PHP7 converters, unfortunately they do not give reliable results.
Re: php converter
PhpStorm by JetBrains is supposed to translate PHP5 to PHP7. I tried to install PhpStorm in Windows 7. The installation crashed. I don't know if there is a PhpStorm for Linux. The fact that PHP7 is not backward compatible with PHP5 in terms of source TXT commands is quite surprising. If I have a text instruction that invokes a certain translation code in PHP5, then perhaps it is not a problem to either keep it in PHP7, perhaps concurrently with a new instruction that invokes the same code.
Example:
in PHP5 I have
$bobo = $bobo_array["bobo"];
while in PHP7 this does not apply and I should have $bobo = $bobo_array['bobo'];
so PHP7 authors should be able to provide a converter that converts those text lines according to the new rules.
Another absurdity: classes Int, String, Float and Bool are forbidden in PHP7. Apparently these are just names. So some converter can rename them in the original PHP5 source from Int to Int5, String to String5, etc. It simply adds the number 5 to the name.
Example:
in PHP5 I have
$bobo = $bobo_array["bobo"];
while in PHP7 this does not apply and I should have $bobo = $bobo_array['bobo'];
so PHP7 authors should be able to provide a converter that converts those text lines according to the new rules.
Another absurdity: classes Int, String, Float and Bool are forbidden in PHP7. Apparently these are just names. So some converter can rename them in the original PHP5 source from Int to Int5, String to String5, etc. It simply adds the number 5 to the name.