i wouldnt install a syslog server only to get log entry in php, thats old and not directly well we dont need 3rd party on our programming. we code directly all.
Isn't PHP kinda old too
. And, I guess nothing would stop PHP from listen on the syslog port and parsing the data. If DIY solution is desired. Mikrotik does have hooks for stuff like DHCP, Netwatch, etc. that are well suited to using /tool/fetch to PHP in realtime – wish there were more "hooks" in ROS but there isn't. But nothing stops a scheduler script as poll quite often to push the data your PHP every few seconds I you want. The REST API could install one via PHP if desired.
But most people use some logging middleware that collects the logs, and then that's what provides an API to something like PHP to proved a view. And importantly these systems, index the logs and make them
query-able by some SQL-like language thus readably usable by something like PHP (or NodeJS, Python, or whatever). Typically these tools have graphical or "low code" designers that are quite powerful to build complex UI that can remove the need for any code at all.
Anyway, most people don't use syslog directly – it's parsed and indexed typically. This because you typically don't want multiple external code to be fetching the same log data, and typically queries against a large log aren't that quick without indexing. While Splunk is great and free at low volume, but quite expensive at higher volume. The "ELK stack" is OSS, which proximates Splunk (and thus @Jotne scripts might be a great example) but is free. For a quick overview of ELK (which is three OSS project ElasticSearch, Logstach, Kabana) see:
https://www.guru99.com/elk-stack-tutorial.html. If you had PHP, you replace the Kabana part of ELK with your own PHP.