Your two questions are not related as you are may be thinking.
The first question where you want to do something like this onclick="func('Wednesday')"
is doable but perhaps not in the way you are imagining, I will do it in someway like this
HTML
<a id="my-button">Click Me</a>
Javascript
function func(a, e) {
if (a == "Wednesday") {
var day = a;
} else {
var day = "not Wednesday";
}
}
var btn = document.getElementById("my-button")
btn.addEventListener("click", func.bind(null, "Wednesday"))
Read more about this way of binding callbacks here https://www.w3.org/wiki/The_principles_of_unobtrusive_JavaScript
Also I used bind
function of Function
to attach arguments with my callback which will be passed to my function whenever callback will be called
Now the questions about passing props from javascript to PHP. Well, think about the flow of server to client. Your PHP sends the javascript to browser as plain text to browser which gets interpreted at user machine, which means when your javascript begins to run PHP was no more in context hence you can't simply pass vars from JS to PHP since one of them runs on server and other on client.
To pass the props from client to server you will need to create AJAX request