<?php
$arParams["PROPERTY_CODE"] = [
0 => "city",
1 => "cashbox",
2 => "scanner"
];
$arResult["PROPERTIES"] = [
"city" =>
[
"ID" => "0",
"TIMESTAMP_X" => "2017-02-04 19:32:54"
],
"cashbox" =>
[
"ID" => "1",
"TIMESTAMP_X" => "2018-02-04 19:32:54"
],
"scanner" =>
[
"ID" => "2",
"TIMESTAMP_X" => "2019-02-04 19:32:54"
],
];
foreach($arParams["PROPERTY_CODE"] as $pid)
{
$prop = $arResult["PROPERTIES"][$pid];
var_dump($prop);
}
unset($pid);
Так тоже должно работать. В конечном итоге переменная $prop останется с одним элементом внутри. Так и надо? killall -9 ffmpeg
$res1 = explode('</li>', $result['diplomas']);
echo '<pre>';
foreach ($res1 as $r) {
echo str_replace('<li>', '', $r);
}
echo '</pre>';
^https\?://(www.)\?(vk.com|fb.com|ok.ru).*\$
^https?:\/\/(?>www\.)?(?>vk\.com|fb\.com|ok\.ru)\/?.*\$
Посмотрел на железке, там экранирован знак конца строки. По идее он не должен экранироваться. Это метасимвол. killall -9 ffmpeg
, разве не должны были закрыться файловые дескрипторы вместе с процессами? COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
ffmpeg 11996 nadmin 220w CHR 212,60 0t0 11375 /dev/dvb/adapter15/demux0
ffmpeg 11996 nadmin 221w CHR 212,12 0t0 10862 /dev/dvb/adapter3/demux0
ffmpeg 11996 nadmin 222w CHR 212,56 0t0 10915 /dev/dvb/adapter14/demux0
ffmpeg 11996 nadmin 223w CHR 212,4 0t0 11337 /dev/dvb/adapter1/demux0
ffmpeg 11996 nadmin 224w CHR 212,4 0t0 11337 /dev/dvb/adapter1/demux0
ffmpeg 11996 nadmin 225w CHR 212,0 0t0 10310 /dev/dvb/adapter0/demux0
ffmpeg 11996 nadmin 226w CHR 212,76 0t0 10933 /dev/dvb/adapter19/demux0
ffmpeg 11996 nadmin 227w CHR 212,60 0t0 11375 /dev/dvb/adapter15/demux0
ffmpeg 11996 nadmin 228w CHR 212,12 0t0 10862 /dev/dvb/adapter3/demux0
ffmpeg 11996 nadmin 229w CHR 212,60 0t0 11375 /dev/dvb/adapter15/demux0
ffmpeg 11996 nadmin 230w CHR 212,12 0t0 10862 /dev/dvb/adapter3/demux0
ffmpeg 11996 nadmin 231w CHR 212,60 0t0 11375 /dev/dvb/adapter15/demux0
ffmpeg 11996 nadmin 232w CHR 212,12 0t0 10862 /dev/dvb/adapter3/demux0
ffmpeg 11996 nadmin 233w CHR 212,60 0t0 11375 /dev/dvb/adapter15/demux0
ffmpeg 11996 nadmin 234w CHR 212,60 0t0 11375 /dev/dvb/adapter15/demux0
ffmpeg 11996 nadmin 235w CHR 212,60 0t0 11375 /dev/dvb/adapter15/demux0
ffmpeg 11996 nadmin 236w CHR 212,60 0t0 11375 /dev/dvb/adapter15/demux0
ffmpeg 11996 nadmin 237w CHR 212,60 0t0 11375 /dev/dvb/adapter15/demux0
ffmpeg 11996 nadmin 238w CHR 212,60 0t0 11375 /dev/dvb/adapter15/demux0
ffmpeg 11996 nadmin 241w CHR 212,4 0t0 11337 /dev/dvb/adapter1/demux0
ffmpeg 11996 nadmin 242w CHR 212,4 0t0 11337 /dev/dvb/adapter1/demux0
ffmpeg 11996 nadmin 243w CHR 212,4 0t0 11337 /dev/dvb/adapter1/demux0
ffmpeg 11996 nadmin 244w CHR 212,4 0t0 11337 /dev/dvb/adapter1/demux0
ffmpeg 11996 nadmin 245w CHR 212,4 0t0 11337 /dev/dvb/adapter1/demux0
ffmpeg 11996 nadmin 246w CHR 212,4 0t0 11337 /dev/dvb/adapter1/demux0
ffmpeg 11996 nadmin 247w CHR 212,76 0t0 10933 /dev/dvb/adapter19/demux0
ffmpeg 11996 nadmin 248w CHR 212,76 0t0 10933 /dev/dvb/adapter19/demux0
ffmpeg 11996 nadmin 249w CHR 212,72 0t0 11387 /dev/dvb/adapter18/demux0
ffmpeg 11996 nadmin 250w CHR 212,72 0t0 11387 /dev/dvb/adapter18/demux0
ffmpeg 11996 nadmin 251w CHR 212,72 0t0 11387 /dev/dvb/adapter18/demux0
ffmpeg 11996 nadmin 253r CHR 212,25 0t0 10876 /dev/dvb/adapter6/dvr0
ffmpeg 11996 nadmin 254u CHR 212,27 0t0 10878 /dev/dvb/adapter6/frontend0
ffmpeg 11996 nadmin 255w CHR 212,24 0t0 10875 /dev/dvb/adapter6/demux0
root@astra:~# stat /dev/dvb
File: '/dev/dvb'
Size: 440 Blocks: 0 IO Block: 4096 directory
Device: 5h/5d Inode: 10308 Links: 22
Access: (0600/drw-------) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2019-02-04 16:39:23.442554608 +0300
Modify: 2019-01-30 11:47:34.842043703 +0300
Change: 2019-02-04 16:38:41.142554236 +0300
Birth: -
root@astra:~# ls -al /dev/dvb
total 0
drw------- 22 root root 440 Jan 30 11:47 .
drwxr-xr-x 19 root root 3220 Jan 30 11:47 ..
drw------- 2 root root 120 Jan 30 11:47 adapter0
drw------- 2 root root 120 Jan 30 11:47 adapter1
drw------- 2 root root 120 Jan 30 11:47 adapter10
drw------- 2 root root 120 Jan 30 11:47 adapter11
drw------- 2 root root 120 Jan 30 11:47 adapter12
drw------- 2 root root 120 Jan 30 11:47 adapter13
drw------- 2 root root 120 Jan 30 11:47 adapter14
drw------- 2 root root 120 Jan 30 11:47 adapter15
drw------- 2 root root 120 Jan 30 11:47 adapter16
drw------- 2 root root 120 Jan 30 11:47 adapter17
drw------- 2 root root 120 Jan 30 11:47 adapter18
drw------- 2 root root 120 Jan 30 11:47 adapter19
drw------- 2 root root 120 Jan 30 11:47 adapter2
drw------- 2 root root 120 Jan 30 11:47 adapter3
drw------- 2 root root 120 Jan 30 11:47 adapter4
drw------- 2 root root 120 Jan 30 11:47 adapter5
drw------- 2 root root 120 Jan 30 11:47 adapter6
drw------- 2 root root 120 Jan 30 11:47 adapter7
drw------- 2 root root 120 Jan 30 11:47 adapter8
drw------- 2 root root 120 Jan 30 11:47 adapter9
root@astra:~# ls -al /dev/dvb/adapter*
/dev/dvb/adapter0:
total 0
drw------- 2 root root 120 Jan 30 11:47 .
drw------- 22 root root 440 Jan 30 11:47 ..
crw------- 1 root root 212, 0 Jan 30 16:26 demux0
crw------- 1 root root 212, 1 Jan 30 11:47 dvr0
crw------- 1 root root 212, 3 Jan 30 11:47 frontend0
crw------- 1 root root 212, 2 Jan 30 11:47 net0
/dev/dvb/adapter1:
total 0
drw------- 2 root root 120 Jan 30 11:47 .
drw------- 22 root root 440 Jan 30 11:47 ..
crw------- 1 root root 212, 4 Jan 30 11:47 demux0
crw------- 1 root root 212, 5 Jan 30 11:47 dvr0
crw------- 1 root root 212, 7 Jan 30 11:47 frontend0
crw------- 1 root root 212, 6 Jan 30 11:47 net0
/dev/dvb/adapter10:
total 0
drw------- 2 root root 120 Jan 30 11:47 .
drw------- 22 root root 440 Jan 30 11:47 ..
crw------- 1 root root 212, 40 Jan 30 11:47 demux0
crw------- 1 root root 212, 41 Jan 30 11:47 dvr0
crw------- 1 root root 212, 43 Jan 30 11:47 frontend0
crw------- 1 root root 212, 42 Jan 30 11:47 net0
/dev/dvb/adapter11:
total 0
drw------- 2 root root 120 Jan 30 11:47 .
drw------- 22 root root 440 Jan 30 11:47 ..
crw------- 1 root root 212, 44 Jan 30 11:47 demux0
crw------- 1 root root 212, 45 Jan 30 11:47 dvr0
crw------- 1 root root 212, 47 Jan 30 11:47 frontend0
crw------- 1 root root 212, 46 Jan 30 11:47 net0
/dev/dvb/adapter12:
total 0
drw------- 2 root root 120 Jan 30 11:47 .
drw------- 22 root root 440 Jan 30 11:47 ..
crw------- 1 root root 212, 48 Jan 30 11:47 demux0
crw------- 1 root root 212, 49 Jan 30 11:47 dvr0
crw------- 1 root root 212, 51 Jan 30 11:47 frontend0
crw------- 1 root root 212, 50 Jan 30 11:47 net0
/dev/dvb/adapter13:
total 0
drw------- 2 root root 120 Jan 30 11:47 .
drw------- 22 root root 440 Jan 30 11:47 ..
crw------- 1 root root 212, 52 Jan 30 11:47 demux0
crw------- 1 root root 212, 53 Jan 30 11:47 dvr0
crw------- 1 root root 212, 55 Jan 30 11:47 frontend0
crw------- 1 root root 212, 54 Jan 30 11:47 net0
/dev/dvb/adapter14:
total 0
drw------- 2 root root 120 Jan 30 11:47 .
drw------- 22 root root 440 Jan 30 11:47 ..
crw------- 1 root root 212, 56 Jan 30 11:47 demux0
crw------- 1 root root 212, 57 Jan 30 11:47 dvr0
crw------- 1 root root 212, 59 Jan 30 11:47 frontend0
crw------- 1 root root 212, 58 Jan 30 11:47 net0
/dev/dvb/adapter15:
total 0
drw------- 2 root root 120 Jan 30 11:47 .
drw------- 22 root root 440 Jan 30 11:47 ..
crw------- 1 root root 212, 60 Jan 30 11:47 demux0
crw------- 1 root root 212, 61 Jan 30 11:47 dvr0
crw------- 1 root root 212, 63 Jan 30 11:47 frontend0
crw------- 1 root root 212, 62 Jan 30 11:47 net0
/dev/dvb/adapter16:
total 0
drw------- 2 root root 120 Jan 30 11:47 .
drw------- 22 root root 440 Jan 30 11:47 ..
crw------- 1 root root 212, 64 Jan 30 11:47 demux0
crw------- 1 root root 212, 65 Jan 30 11:47 dvr0
crw------- 1 root root 212, 67 Jan 30 11:47 frontend0
crw------- 1 root root 212, 66 Jan 30 11:47 net0
/dev/dvb/adapter17:
total 0
drw------- 2 root root 120 Jan 30 11:47 .
drw------- 22 root root 440 Jan 30 11:47 ..
crw------- 1 root root 212, 68 Jan 30 11:47 demux0
crw------- 1 root root 212, 69 Jan 30 11:47 dvr0
crw------- 1 root root 212, 71 Jan 30 11:47 frontend0
crw------- 1 root root 212, 70 Jan 30 11:47 net0
/dev/dvb/adapter18:
total 0
drw------- 2 root root 120 Jan 30 11:47 .
drw------- 22 root root 440 Jan 30 11:47 ..
crw------- 1 root root 212, 72 Jan 30 11:47 demux0
crw------- 1 root root 212, 73 Jan 30 11:47 dvr0
crw------- 1 root root 212, 75 Jan 30 11:47 frontend0
crw------- 1 root root 212, 74 Jan 30 11:47 net0
/dev/dvb/adapter19:
total 0
drw------- 2 root root 120 Jan 30 11:47 .
drw------- 22 root root 440 Jan 30 11:47 ..
crw------- 1 root root 212, 76 Jan 30 11:47 demux0
crw------- 1 root root 212, 77 Jan 30 11:47 dvr0
crw------- 1 root root 212, 79 Jan 30 11:47 frontend0
crw------- 1 root root 212, 78 Jan 30 11:47 net0
/dev/dvb/adapter2:
total 0
drw------- 2 root root 120 Jan 30 11:47 .
drw------- 22 root root 440 Jan 30 11:47 ..
crw------- 1 root root 212, 8 Jan 30 11:47 demux0
crw------- 1 root root 212, 9 Jan 30 11:47 dvr0
crw------- 1 root root 212, 11 Jan 30 11:47 frontend0
crw------- 1 root root 212, 10 Jan 30 11:47 net0
/dev/dvb/adapter3:
total 0
drw------- 2 root root 120 Jan 30 11:47 .
drw------- 22 root root 440 Jan 30 11:47 ..
crw------- 1 root root 212, 12 Jan 30 11:47 demux0
crw------- 1 root root 212, 13 Jan 30 11:47 dvr0
crw------- 1 root root 212, 15 Jan 30 11:47 frontend0
crw------- 1 root root 212, 14 Jan 30 11:47 net0
/dev/dvb/adapter4:
total 0
drw------- 2 root root 120 Jan 30 11:47 .
drw------- 22 root root 440 Jan 30 11:47 ..
crw------- 1 root root 212, 16 Jan 30 11:47 demux0
crw------- 1 root root 212, 17 Jan 30 11:47 dvr0
crw------- 1 root root 212, 19 Jan 30 11:47 frontend0
crw------- 1 root root 212, 18 Jan 30 11:47 net0
/dev/dvb/adapter5:
total 0
drw------- 2 root root 120 Jan 30 11:47 .
drw------- 22 root root 440 Jan 30 11:47 ..
crw------- 1 root root 212, 20 Jan 30 11:47 demux0
crw------- 1 root root 212, 21 Jan 30 11:47 dvr0
crw------- 1 root root 212, 23 Jan 30 11:47 frontend0
crw------- 1 root root 212, 22 Jan 30 11:47 net0
/dev/dvb/adapter6:
total 0
drw------- 2 root root 120 Jan 30 11:47 .
drw------- 22 root root 440 Jan 30 11:47 ..
crw------- 1 root root 212, 24 Jan 30 11:47 demux0
crw------- 1 root root 212, 25 Jan 30 11:47 dvr0
crw------- 1 root root 212, 27 Jan 30 11:47 frontend0
crw------- 1 root root 212, 26 Jan 30 11:47 net0
/dev/dvb/adapter7:
total 0
drw------- 2 root root 120 Jan 30 11:47 .
drw------- 22 root root 440 Jan 30 11:47 ..
crw------- 1 root root 212, 28 Jan 30 11:47 demux0
crw------- 1 root root 212, 29 Jan 30 11:47 dvr0
crw------- 1 root root 212, 31 Jan 30 11:47 frontend0
crw------- 1 root root 212, 30 Jan 30 11:47 net0
/dev/dvb/adapter8:
total 0
drw------- 2 root root 120 Jan 30 11:47 .
drw------- 22 root root 440 Jan 30 11:47 ..
crw------- 1 root root 212, 32 Jan 30 11:47 demux0
crw------- 1 root root 212, 33 Jan 30 11:47 dvr0
crw------- 1 root root 212, 35 Jan 30 11:47 frontend0
crw------- 1 root root 212, 34 Jan 30 11:47 net0
/dev/dvb/adapter9:
total 0
drw------- 2 root root 120 Jan 30 11:47 .
drw------- 22 root root 440 Jan 30 11:47 ..
crw------- 1 root root 212, 36 Jan 30 11:47 demux0
crw------- 1 root root 212, 37 Jan 30 11:47 dvr0
crw------- 1 root root 212, 39 Jan 30 11:47 frontend0
crw------- 1 root root 212, 38 Jan 30 11:47 net0