This unprefixed function, added in r7198 (
2b3f4c749d3d), has been
unused since r12411 (
f2a59db33f33).
It is short and simple enough that on the rare occasions it is needed,
it can be inlined or copied into the calling class as a private method.
Alternatively, the idiom `list( $a, $b ) = array( $b, $a )` can be used.
Change-Id: Ieb4602597a54eb21a5de177fee6dafa7ac71ce1d
/**
* Swap two variables
*
+ * @deprecated since 1.24
* @param mixed $x
* @param mixed $y
*/
function swap( &$x, &$y ) {
+ wfDeprecated( __FUNCTION__, '1.24' );
$z = $x;
$x = $y;
$y = $z;
* @covers ::swap
*/
public function testSwapVarsTest() {
+ $this->hideDeprecated( 'swap' );
+
$var1 = 1;
$var2 = 2;