You are here: PSPad forum > English discussion forum > Change PHP Version?

Change PHP Version?

#1 Change PHP Version?

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.

Options: Reply | Quote | Up ^


#2 Re: Change PHP Version?

Posted by: pspad | Date: 2019-03-04 09:15 | IP: IP Logged

Hello

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.

Options: Reply | Quote | Up ^


#3 Re: Change PHP Version?

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>

Options: Reply | Quote | Up ^


#4 Re: Change PHP Version?

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.

Options: Reply | Quote | Up ^


#5 Re: Change PHP Version?

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!

Options: Reply | Quote | Up ^


#6 Re: Change PHP Version?

Posted by: Alan_K | Date: 2019-03-04 18:22 | IP: IP Logged

Thanks folks,

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??

Options: Reply | Quote | Up ^


#7 Re: Change PHP Version?

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.

Options: Reply | Quote | Up ^


#8 Re: Change PHP Version?

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

Options: Reply | Quote | Up ^


#9 Re: Change PHP Version?

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.

Options: Reply | Quote | Up ^






Editor PSPad - freeware editor, © 2001 - 2024 Jan Fiala, Hosted by Webhosting TOJEONO.CZ, design by WebDesign PAY & SOFT, code Petr Dvořák, Privacy policy and GDPR