Tried
shell_exec("clang main.c 2>&1");
clang: error: unable to execute command: Executable "ld" doesn't exist! clang: error: linker command failed with exit code 1 (use -v to see invocation)
exec("PATH=/bin");
not working
Also tried How to compile with gcc in php?
https://www.linuxquestions.org/questions/programming-9/compiling-c-prog-using-gcc-in-php-234619/ not working either