Created
May 4, 2022 03:35
-
-
Save rodrigo-x/d064cea74407640a81be09317a875df3 to your computer and use it in GitHub Desktop.
asdf php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ASDF + PHP no Arch sem Apache/Nginx | |
asdf plugin-add php https://github.com/asdf-community/asdf-php.git1 | |
# Listar as versões do PHP | |
asdf list-all php # Recomendo que você escolha a 8.1.5 | |
# Dependências que eu tive que resolver com o pacman | |
sudo pacman -S libzip postgresql-libs perl-gd | |
# instalar a versão stable | |
asdf install php 8.1.5 | |
# Colocar a versão como Global ou Local | |
asdf global php 8.1.5 | |
# bashin violento | |
echo "php 8.1.5" >> $HOME/.tool-versions | |
# Tudo pronto, só criar um code_php01.php | |
<?php | |
phpinfo(); | |
?> | |
# criar servidor local | |
php -S localhost:8000 | |
# acesse no browser | |
http://localhost:8000/code_php01.php | |
Enjoy! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment