Welcome to collectivesolver - Programming & Software Q&A with code examples. A website with trusted programming answers. All programs are tested and work.

Contact: aviboots(AT)netvision.net.il

Buy a domain name - Register cheap domain names from $0.99 - Namecheap

Scalable Hosting That Grows With You

Secure & Reliable Web Hosting, Free Domain, Free SSL, 1-Click WordPress Install, Expert 24/7 Support

Semrush - keyword research tool

Boost your online presence with premium web hosting and servers

Disclosure: My content contains affiliate links.

39,860 questions

51,781 answers

573 users

How to get OS information on Unix-like systems with PHP

1 Answer

0 votes
echo "System Name: " . php_uname('s') . "\n";
echo "Node Name: " . php_uname('n') . "\n";
echo "Release: " . php_uname('r') . "\n";
echo "Version: " . php_uname('v') . "\n";
echo "Machine: " . php_uname('m') . "\n";



/*
run:

System Name: Linux
Node Name: 474979ba9444
Release: 5.10.226-214.880.amzn2.x86_64
Version: #1 SMP Tue Oct 8 16:18:15 UTC 2024
Machine: x86_64

*/

 



answered Jun 6, 2025 by avibootz

Related questions

1 answer 74 views
1 answer 63 views
1 answer 93 views
1 answer 57 views
1 answer 82 views
1 answer 53 views
...