Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Paste
P17427
hook array merge test
Active
Public
Actions
Authored by
daniel
on Oct 6 2021, 8:56 AM.
Edit Paste
Archive Paste
View Raw File
Subscribe
Mute Notifications
Award Token
Flag For Later
Tags
None
Referenced Files
F34675599: hook array merge test
Oct 6 2021, 8:56 AM
2021-10-06 08:56:25 (UTC+0)
Subscribers
CCicalese_WMF
<?php
$wgHooks1
=
[
'Foo'
=>
[
'X::onFoo'
,
'Y::onFoo'
,
[
'myFoo'
,
[
'n'
=>
1
,
'm'
=>
2
,
3
]
]
],
'Bar'
=>
[
'X::onBar'
,
'Y::onBar'
,
[
'myBar'
,
[
'n'
=>
11
,
'm'
=>
12
,
13
]
]
],
];
$wgHooks2
=
[
'Foo'
=>
[
'A::onFoo'
,
'B::onFoo'
,
[
'yourFoo'
,
[
'n'
=>
1
,
'm'
=>
2
,
3
]
]
],
'Bar'
=>
[
'A::onBar'
,
'B::onBar'
,
[
'yourBar'
,
[
'n'
=>
21
,
'm'
=>
22
,
23
]
]
],
];
print
"
\n\n
array_merge:
\n
"
;
var_export
(
array_merge
(
$wgHooks1
,
$wgHooks2
)
);
print
"
\n\n
array_merge_recursive:
\n
"
;
var_export
(
array_merge_recursive
(
$wgHooks1
,
$wgHooks2
)
);
print
"
\n\n
array_replace_recursive:
\n
"
;
var_export
(
array_replace_recursive
(
$wgHooks1
,
$wgHooks2
)
);
Event Timeline
daniel
created this paste.
Oct 6 2021, 8:56 AM
2021-10-06 08:56:25 (UTC+0)
daniel
mentioned this in
T292602: Deprecate array_merge_recursive merge strategy from extension.json's "config" section
.
Oct 6 2021, 8:58 AM
2021-10-06 08:58:33 (UTC+0)
Log In to Comment