Ask coding questions

← Back to all posts
Update PHP to 7.4?
h
Baconman321 (1060)

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.

Comments
hotnewtop
MiaChillfox (1)

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.

Baconman321 (1060)

@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).

MiaChillfox (1)

@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?).

Baconman321 (1060)

@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).