回答編集履歴
5
dump関数をvar_dump関数に変更
test
CHANGED
@@ -17,3 +17,15 @@
|
|
17
17
|
var_dump($replaces);
|
18
18
|
```
|
19
19
|
|
20
|
+
```
|
21
|
+
array(4) {
|
22
|
+
[0]=>
|
23
|
+
string(200) "20221111223456789111888888888899999999990000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
|
24
|
+
[1]=>
|
25
|
+
string(200) "20221111101112131415151617181900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
|
26
|
+
[2]=>
|
27
|
+
string(200) "20221111211018600034202122232425262728290000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
|
28
|
+
[3]=>
|
29
|
+
string(200) "20221111211018600122123456789212345678991234567898123456789700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
|
30
|
+
}
|
31
|
+
```
|
4
表示バグ修正
test
CHANGED
@@ -14,6 +14,6 @@
|
|
14
14
|
}
|
15
15
|
|
16
16
|
$replaces = array_map('convert', $results);
|
17
|
-
dump($replaces);
|
17
|
+
var_dump($replaces);
|
18
18
|
```
|
19
19
|
|
3
関数名変更、表示をdumpに変更
test
CHANGED
@@ -14,6 +14,6 @@
|
|
14
14
|
}
|
15
15
|
|
16
16
|
$replaces = array_map('convert', $results);
|
17
|
-
dump($replaces
|
17
|
+
dump($replaces);
|
18
18
|
```
|
19
19
|
|
2
関数名変更
test
CHANGED
@@ -8,14 +8,12 @@
|
|
8
8
|
["20221111", "211018600122", "1234567892", "1234567899", "1234567898", "1234567897"],
|
9
9
|
];
|
10
10
|
|
11
|
-
function
|
11
|
+
function convert($strings)
|
12
12
|
{
|
13
13
|
return substr(str_pad(join('', $strings), 200, '0', STR_PAD_RIGHT), 0, 200);
|
14
14
|
}
|
15
15
|
|
16
|
-
$replaces = array_map('
|
16
|
+
$replaces = array_map('convert', $results);
|
17
|
-
|
17
|
+
dump($replaces as $replace);
|
18
|
-
echo $replace.PHP_EOL;
|
19
|
-
}
|
20
18
|
```
|
21
19
|
|
1
test
CHANGED
@@ -8,12 +8,12 @@
|
|
8
8
|
["20221111", "211018600122", "1234567892", "1234567899", "1234567898", "1234567897"],
|
9
9
|
];
|
10
10
|
|
11
|
-
function c
|
11
|
+
function process($strings)
|
12
12
|
{
|
13
13
|
return substr(str_pad(join('', $strings), 200, '0', STR_PAD_RIGHT), 0, 200);
|
14
14
|
}
|
15
15
|
|
16
|
-
$replaces = array_map('c
|
16
|
+
$replaces = array_map('process', $results);
|
17
17
|
foreach ($replaces as $replace) {
|
18
18
|
echo $replace.PHP_EOL;
|
19
19
|
}
|