Skip to main content

Questions tagged [php]

Questions about PHP, a widely-used general-purpose scripting language that is especially suited for Web development.

2 votes
2 answers
151 views

In PHP, trim() exists. By default the second parameter is " \n\r\t\v\x00" I wish to introduce my own version which doesn't deviate far from the core functionality: // Trim whitespace in ...
MonkeyZeus's user avatar
3 votes
3 answers
236 views

I'm trying to implement a heartbeat feature for offline tracking that just sends an offline message to the server once the web browser app (Laravel-based) is offline. Ideally it will ping the app's ...
meowyn0316's user avatar
3 votes
1 answer
194 views

Imagine I got user which might be either author, administrator, reviewer An author have relation on book that he wrote. An administrator have relation on banned user (we track which administrator ...
Vincent PHILIPPE's user avatar
1 vote
1 answer
153 views

I am building a website that uses a recommendation system. Users submit a form which is sent to the backend for the recommendation logic calculation; the recommendation response is sent back to the ...
Leksa99's user avatar
  • 19
2 votes
1 answer
200 views

I have an interface defined as follows: interface MyInterface { public function setMyMethod(int $a); public function getMyMethod(): int; } And I have a class that widens the parameter type: ...
Joao M's user avatar
  • 131