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('ipconfig /all'); //Execute external program to display output $mycom=ob_get_contents(); // Capture the output into a variable ob_clean(); // Clean (erase) the output buffer $findme = 'Physical'; $pmac = strpos($mycom, $findme); // Find the position of Physical text $mac=substr($mycom,($pmac+36),17); // Get Physical Address echo $mac;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/FBD4D
function name:  (null)
number of ops:  25
compiled vars:  !0 = $mycom, !1 = $findme, !2 = $pmac, !3 = $mac
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   INIT_FCALL                                               'ob_start'
          1        DO_ICALL                                                 
    8     2        INIT_FCALL                                               'system'
          3        SEND_VAL                                                 'ipconfig+%2Fall'
          4        DO_ICALL                                                 
    9     5        INIT_FCALL                                               'ob_get_contents'
          6        DO_ICALL                                         $6      
          7        ASSIGN                                                   !0, $6
   10     8        INIT_FCALL                                               'ob_clean'
          9        DO_ICALL                                                 
   12    10        ASSIGN                                                   !1, 'Physical'
   13    11        INIT_FCALL                                               'strpos'
         12        SEND_VAR                                                 !0
         13        SEND_VAR                                                 !1
         14        DO_ICALL                                         $10     
         15        ASSIGN                                                   !2, $10
   14    16        INIT_FCALL                                               'substr'
         17        SEND_VAR                                                 !0
         18        ADD                                              ~12     !2, 36
         19        SEND_VAL                                                 ~12
         20        SEND_VAL                                                 17
         21        DO_ICALL                                         $13     
         22        ASSIGN                                                   !3, $13
   16    23        ECHO                                                     !3
         24      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.42 ms | 1399 KiB | 25 Q