3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Prepare parameters to call function that will call shell script on OCF to perform a charge $uid = posix_getuid(); $shell_user = posix_getpwuid($uid); echo $shell_user; $myhomepath=$_SERVER['HOME']; echo "MY HOME DIR: $myhomepath" #$home_dir = posix_getpwuid(getmyuid())['dir']; #echo "MY HOME DIR: $home_dir"; exit; $RCMD = "data_sms_uat"; $A_MSISDN = 852223373; $B_MSISDN = 859990002; $S_CONTEXT = "32274@3gpp.org"; echo "FULL CMD LINE CALL \n"; $xpath = $_ENV['PATH']; echo "MYPATH: $xpath"; shell_exec('C:\\Windows\\System32\\cmd.exe /c echo "Hello World 1"'); $output = shell_exec('echo "Hello World 2"'); echo $output; $sshcmd="ssh -i \"C:\Users\Mary Brady\.ssh-otp\id_rsa_automated_test\" otp@10.10.210.77 $RCMD --msisdn $id1 \ --context $S_CONTEXT --service-id $serviceId --rating-group $ratingGroup --interval $interval --updates $updates"; echo "$sshcmd \n"; $output = shell_exec($sshcmd); //shell_exec("ssh mary.brady@10.10.210.77 ./createandrun.sh send_sms_uat 852223373 859990002 32274@3gpp.org"); echo "This is the result: $output";
Output for git.master, git.master_jit
Parse error: syntax error, unexpected token "exit", expecting "," or ";" in /in/aXPdX on line 12
Process exited with code 255.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
136.63 ms | 995 KiB | 7 Q