Posted by: Alan_K | Date: 2019-03-04 08:01 | IP: IP Logged
Can the PHP version be changed?
I've used PSpad for about 15 years, and only just upgraded my version yesterday since the last one was installed in 2007.
But I'm having to change my coding on my PHP scripts because other apps wont work on anything below PHP V7.0.
I'm clueless as to how I'm going to undertake this task. My flawed logic said that if I throw an old PHP V5.6 script into a new version of PSpad it's going to highlight where I've got issues. But I can't even fnd out where it says what version of PHP we are coding in with PSpad.
So, firstly what version of PHP does the latest version of PSpad support?
Can the versions of PHP be changed in PSpad?
Will PSpad detect and highlight changes in PHP versions when code is given a newer version of PHP to work with?
Or, forget all the above, does anyone know an easier way for me to overcome my problem?
Many thanks in advance for any assistance.
Posted by: pspad | Date: 2019-03-04 09:15 | IP: IP Logged
PSpad doesn't contains any "PHP vetrsion". It's only tool where you write your PHP scripts and highlight PHP syntax.
If you will use syntax supported by PHP 7, it will work on PHP 7. If you will use any deprecated functions, it won't work on PHP 7.
Posted by: anstreo | Date: 2019-03-04 10:26 | IP: IP Logged
Alan_K:Can the PHP version be changed? ... But I'm having to change my coding on my PHP scripts because other apps wont work on anything below PHP V7.0.
May do you mean the PSPad highligter/compiler configuration?: <Settings><Highlighter><php><compiler>
Posted by: pspad | Date: 2019-03-04 11:01 | IP: IP Logged
On this configuration page you show path to your local PHP.exe
Again. PHP or any web server isn't part of PSPad. It's your local web server you installed it on your computer.
Posted by: anstreo | Date: 2019-03-04 11:11 | IP: IP Logged
pspad:... It's your local web server you installed ...
and the webserver path could be configured here: <settings><Web server>
As Jan pointed out, both settings only show the path to your own Php/Web server configuration. Which is independent to your PSPad installation!
Posted by: Alan_K | Date: 2019-03-04 18:22 | IP: IP Logged
If I write the syntax wrong PSpad used to throw up / highlight something in red - but how did it know my syntax was wrong? - it might have been the correct syntax in the latest version but not in a previous one.
However, I'll just take it that my logic is flawed and I can't do what I hoped.
How does one amend / re-write a script when there's such a change in versions, where do you begin? Is there a handy "this is what we used to do in 5.6 and this is what the same thing now looks like in 7.x" set of tutorials on the most common things??
Posted by: pspad | Date: 2019-03-04 18:50 | IP: IP Logged
PSpad doesn't contains all function names from all PHP available libraries.
Syntax highlight is based of basic keywords, data types and rules.
It's possible there are new keywords or rules applied in new PHP version what PSPad doesn't know.
In such case I need some source sample with wrong syntax highlight and description what's wrong. I can update syntax highlighter.
Posted by: Alan_K | Date: 2019-03-05 08:27 | IP: IP Logged
Sure, I understand. Thanks for the info, at least it narrows down my options for me.
I've spent ages reading the new things and the depracated things in the versions and I come away thinking, "But I haven't even gone there, either way, with my coding."
PHP is sooo unforgiving lol
Posted by: pspad | Date: 2019-03-05 08:50 | IP: IP Logged
If you attach php.exe as compiler in the highlighter settings, you can use it for syntax check your PHP scripts with log, display error message e.t.c.
See the compiler settings in the included PSPad help (or press F1 on the compiler settings page). There are examples how to set it up.