Skip to content
Sign upLog in
← Back to Community

Update PHP to 7.4?

Profile icon
Baconman321

Is there any way to update PHP to 7.4?

setcookie() can accept an array of options in 7.4 which is what I am want to do, but I can't do it in replit because PHP is only 7.2.

Voters
Profile icon
MiaChillfox
Profile icon
RexTainer
Profile icon
Baconman321
Comments
hotnewtop
Profile icon
MiaChillfox

Hi,
I made a script that can install PHP 7.3, 7.4 or 8.0.

https://replit.com/talk/share/Script-to-install-PHP-73-74-and-80/131222

Currently, it is just PHP, so it might not include the modules you want.

Profile icon
Baconman321

@MiaChillfox
Well, yeah with bash you can always fetch the download and build the directory. I was hoping that replit had a more native way to do it (plus any method I want to know how to do for myself. Seems pretty self explanatory (curl the download and build it then run that instead of the native version though).

Profile icon
MiaChillfox

@Baconman321
I have been pretty disappointed to learn that not only does Replit not have a way to pick which version of a language to use, but it's all old versions.
Their support boils down to "wait it out" and I just got an email listing bug reports (like what am I supposed to do with that?).

Profile icon
Baconman321

@MiaChillfox
Yeah, tbh replit focuses more on features than they do with the languages. At least they provide access to file i/o with bash, so you can always "install" packages/newer versions of the language, but it would be nice to have access to sudo update or something like that (I forget the exact command).

Profile icon
CentreonBot

+1 PHP 7.4 is now least stable version before PHP 8

Profile icon
Baconman321

@CentreonBot
Oh really?
Wow.

Profile icon
CentreonBot

@Baconman321
I just create a new project then, select PHP web server it gave me version 7.4 btw, it already 7.4