How to detect Safari browser

PHP, JS: How to detect Safari browser

PHP Example: Result: Javascript Recent search terms:https://yandex ru/clck/jsredir?from=yandex ru;search;web;;&text=&etext=1839 ScNsAKCG89J16vpqh_htm00UtKdWcWxXhOvOfGjcG3bEdJXpHtx9CaS9BNfhdjan 56a01d8c2ce3d81190258c118a12ccf93847ed5e&uuid=&state=_BLhILn4SxNIvvL0W45KSic66uCIg23qh8iRG98qeIXmehttps://yandex ru/clck/jsredir?from=yandex ru;search;web;;&text=&etext=1827 _hxVtkEV5GENgs0nPukLR0fHy7Eimd9SLFZbTUbBaVfhYAyrtkIh0bkFwh9hImff 1efb4c8e70dd2a67bfbe0593fdc8f048b742fa81&uuid=&state=_BLhILn4SxNIvvL0W45KSic66uCIg23qh8iRG98qeIXmehttps://yandex ru/clck/jsredir?from=yandex ru;search;web;;&text=&etext=1827 xq-CPxsOvpBOvbIeaAPscxRsDaeHslqr7aSF9Ojjl0Ir_PGEoXibUcfMUt8vvVLu 8f81ecd87de0db5e8bdede4c3e64933369232f7c&uuid=&state=_BLhILn4SxNIvvL0W45KSic66uCIg23qh8iRG98qeIXmehttps://yandex ru/clck/jsredir?from=yandex ru;search;web;;&text=&etext=1827 o6sTIBA8ZaSyNCRQcXW9aTsCu2ltpRcI56DX-nuLyGTJlbpRAvcZG8TO0NlK8Cua 890ed5de24524513adbe055d43d08ebb6c8f2dc7&uuid=&state=_BLhILn4SxNIvvL0W45KSic66uCIg23qh8iRG98qeIXmehttps://yandex ru/clck/jsredir?from=yandex ru;search;web;;&text=&etext=1826…