PHPize Online / SQLize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
Copy Clear
Copy Format Clear
<?php $input = "System: Host: pc-name-x7-015.dom.dex Kernel: 6.15.1-1.ex7.linux.x86_64 arch: x86_64 bits: 64 Console: N/A Distro: RedOS release 7.3 (Final) Machine: Type: Desktop Mobo: Gigabyte model: B560M DS3H V2 v: x.x serial: UEFI: American Megatrends LLC. v: F4 date: 11/03/2021 CPU: Info: 6-core model: 11th Gen Intel Core i5-11400 bits: 64 type: MT MCP cache: L2: 3 MiB Speed (MHz): avg: 4222 min/max: 800/4400 cores: 1: 4200 2: 4199 3: 4201 4: 4234 5: 4200 6: 4200 7: 4278 8: 4200 9: 4204 10: 4256 11: 4296 12: 4202 Graphics: Device-1: Intel HD Graphics 530 driver: i915 v: kernel Device-2: Logitech Webcam C310 driver: snd-usb-audio,uvcvideo type: USB Display: server: X.org driver: X: loaded: modesetting unloaded: fbdev,vesa gpu: i915 tty: 80x40 resolution: 1: 1920x1080 2: 2560x1440 API: OpenGL Message: GL data unavailable in console. Try -G --display API: Vulkan Message: No Vulkan data available. Audio: Device-1: Intel driver: snd_hda_intel Device-2: Logitech Webcam C310 driver: snd-usb-audio,uvcvideo type: USB Device-3: Intel driver: hid-generic,snd-usb-audio,usbhid type: USB API: ALSA v: k5.16.2-1.el7.alteros.x86_64 status: kernel-api Network: Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet driver: r8169 IF: enp2s0 state: up speed: 100 Mbps duplex: full mac: d8:5e:d3:a8:7a:dc Drives: Local Storage: total: 1.36 TiB used: 59.17 GiB (4.2%) ID-1: /dev/sda vendor: Western Digital model: WD10EZEX-08WN4A0 size: 931.51 GiB ID-2: /dev/sdb vendor: Crucial model: CT500BX500SSD1 size: 465.76 GiB Partition: ID-1: / size: 449.02 GiB used: 59.02 GiB (13.1%) fs: ext4 dev: /dev/sdb4 ID-2: /boot size: 3.86 GiB used: 137.3 MiB (3.5%) fs: ext4 dev: /dev/sdb2 ID-3: /boot/efi size: 498.7 MiB used: 11 MiB (2.2%) fs: vfat dev: /dev/sdb1 Swap: ID-1: swap-1 type: partition size: 4 GiB used: 0 KiB (0.0%) dev: /dev/sdb3 Sensors: System Temperatures: cpu: 45.0 C mobo: N/A Fan Speeds (rpm): N/A Info: Processes: 309 Uptime: 1d 1h 38m Memory: total: 8 GiB available: 7.57 GiB used: 3.3 GiB (43.6%) Init: systemd target: graphical (5) Shell: sshd inxi: 3.3.30 Network: Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet driver: r8169 IF: enp2s0 state: up speed: 100 Mbps duplex: full mac: d8:6e:d4:a2:5a:dc IP v4: 100.160.80.185/24 type: noprefixroute scope: global IP v6: fd80::da4e:d4ff:fea6:7adc/64 scope: link WAN IP: ;; connection timed out; no servers could be reached"; $fields = [ "Host", "Mobo", "model", "v", "date", "Info", "model", "Device-1", "resolution: 1", "2", "mac", ]; $chunks = array_chunk(preg_split('/[: ]/', $input), 2); $result = array_combine(array_column($chunks, 0), array_column($chunks, 1)); print_r ($result);
Show:  
Copy Clear