3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $users = ['uca1069', 'ucb1023', 'obu1073', 'uws1081']; foreach ($users as $user) { echo "useradd $user usermod -aG sftp $user usermod -s /bin/false $user mkdir /etc/ssh/$user touch /etc/ssh/$user/authorised_keys chmod 0755 /home/$user chown root:$user /home/$user mkdir /home/$user/uploads chown $user:$user /home/$user/uploads\n"; }
Output for 5.4.0 - 7.1.0
useradd uca1069 usermod -aG sftp uca1069 usermod -s /bin/false uca1069 mkdir /etc/ssh/uca1069 touch /etc/ssh/uca1069/authorised_keys chmod 0755 /home/uca1069 chown root:uca1069 /home/uca1069 mkdir /home/uca1069/uploads chown uca1069:uca1069 /home/uca1069/uploads useradd ucb1023 usermod -aG sftp ucb1023 usermod -s /bin/false ucb1023 mkdir /etc/ssh/ucb1023 touch /etc/ssh/ucb1023/authorised_keys chmod 0755 /home/ucb1023 chown root:ucb1023 /home/ucb1023 mkdir /home/ucb1023/uploads chown ucb1023:ucb1023 /home/ucb1023/uploads useradd obu1073 usermod -aG sftp obu1073 usermod -s /bin/false obu1073 mkdir /etc/ssh/obu1073 touch /etc/ssh/obu1073/authorised_keys chmod 0755 /home/obu1073 chown root:obu1073 /home/obu1073 mkdir /home/obu1073/uploads chown obu1073:obu1073 /home/obu1073/uploads useradd uws1081 usermod -aG sftp uws1081 usermod -s /bin/false uws1081 mkdir /etc/ssh/uws1081 touch /etc/ssh/uws1081/authorised_keys chmod 0755 /home/uws1081 chown root:uws1081 /home/uws1081 mkdir /home/uws1081/uploads chown uws1081:uws1081 /home/uws1081/uploads
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/vElWj on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected '[' in /in/vElWj on line 3
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/vElWj on line 3
Process exited with code 255.