Skip to content

How to use bindTo in PHP

it is not exactly a question, but I found a following example and I can’t understand how does it work, can someone explain it? I understand the code, but putting together it doesn’t make sanse to me. The answer should be 5 btw. Thank you in advance. Answer The example in your question is a bit mor…

Regex to find and expression and insert into the middle

I’ll be brief as I can. I’m trying to use preg_replace’s regex to find a digit, but I want to non destructively edit the string. an example: (albeit this is an approximation due to data protection) Any help would be gratefully received Answer Use Replace with <hr/>$0. See regex proof. …

The trick of the ternary operator?

Is there a way to use such a construction? Auth::check() ?? echo “
Log in please
” Auth::check checks whether the user is authorized This trick with ternary operator …