PHP Classes

Minimum PHP Version

Recommend this page to a friend!

      PHP Ghost Crypt  >  All threads  >  Minimum PHP Version  >  (Un) Subscribe thread alerts  
Subject:Minimum PHP Version
Summary:PHP 5.4
Messages:4
Author:Dave Smith
Date:2015-11-20 17:40:53
 

  1. Minimum PHP Version   Reply   Report abuse  
Picture of Dave Smith Dave Smith - 2015-11-20 17:40:53
You need at least PHP 5.4 to avoid the syntax error with this line...

$outFile = explode($inFileInfo['extension'], $inFile)[0];

You need at least PHP 5.3.3 for the open_ssl functions.

If you want to run this package on PHP 5.3.3, you can replace the $outfile line with...

list($outfile, $junk) = explode($inFileInfo['extension'], $inFile, 2);

Dave

  2. Re: Minimum PHP Version   Reply   Report abuse  
Picture of Nick Daniels Nick Daniels - 2015-11-21 01:52:05 - In reply to message 1 from Dave Smith
I've fixed the issue with the array,

So now minimal version should be 5.3.3 at least, which I'll fix on the site now.

I went with the below,

list($outFile,) = explode($inFileInfo['extension'], $inFile);

- Hopefully no problems there now. :)

  3. Re: Minimum PHP Version   Reply   Report abuse  
Picture of Nick Daniels Nick Daniels - 2015-11-21 02:03:02 - In reply to message 1 from Dave Smith
I also comented the script a little, tell me what you think, and what comments could be added.

I'm not sure who added the tags, but it got longer as time went on, from Comment Script; to comment, comment class, comment script.

Not actually sure how to change those tags tbh. lol.

  4. Minimum PHP Version 5.3.3   Reply   Report abuse  
Picture of Dave Smith Dave Smith - 2015-11-21 03:12:33 - In reply to message 2 from Nick Daniels
That will work.

Besides, I had a typo in my replacement code where I did not camelBack the $outFile variable.

Dave