3v4l.org

run code in 300+ PHP versions simultaneously
<?php /* * Getting MAC Address using PHP * Md. Nazmul Basher */ ob_start(); // Turn on output buffering system('/sbin/ifconfig | grep HWaddr'); //Execute external program to display output $mycom=ob_get_contents(); // Capture the output into a variable ob_clean(); // Clean (erase) the output buffer echo $mycom;die; $findme = 'Physical'; $pmac = strpos($mycom, $findme); // Find the position of Physical text $mac=substr($mycom,($pmac+36),17); // Get Physical Address echo $mac;
Output for git.master, git.master_jit, rfc.property-hooks
Warning: system(): Unable to fork [/sbin/ifconfig | grep HWaddr] in /in/F3DPo on line 8

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
41.98 ms | 401 KiB | 8 Q