Title: wp_clone
Published: April 25, 2014
Last modified: February 24, 2026

---

# wp_clone( object $input_object ): object

## In this article

 * [Parameters](https://developer.wordpress.org/reference/functions/wp_clone/?output_format=md#parameters)
 * [Return](https://developer.wordpress.org/reference/functions/wp_clone/?output_format=md#return)
 * [Source](https://developer.wordpress.org/reference/functions/wp_clone/?output_format=md#source)
 * [Changelog](https://developer.wordpress.org/reference/functions/wp_clone/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/functions/wp_clone/?output_format=md#wp--skip-link--target)

This function has been deprecated since 3.2.0.

Clones an object.

## 󠀁[Parameters](https://developer.wordpress.org/reference/functions/wp_clone/?output_format=md#parameters)󠁿

 `$input_object`objectrequired

The object to clone.

## 󠀁[Return](https://developer.wordpress.org/reference/functions/wp_clone/?output_format=md#return)󠁿

 object The cloned object.

## 󠀁[Source](https://developer.wordpress.org/reference/functions/wp_clone/?output_format=md#source)󠁿

    ```php
    function wp_clone( $input_object ) {
    	// Use parens for clone to accommodate PHP 4. See #17880.
    	return clone( $input_object );
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/load.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/6.9.4/src/wp-includes/load.php#L1322)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/load.php#L1322-L1325)

## 󠀁[Changelog](https://developer.wordpress.org/reference/functions/wp_clone/?output_format=md#changelog)󠁿

| Version | Description | 
| [3.2.0](https://developer.wordpress.org/reference/since/3.2.0/) | Deprecated.  | 
| [2.7.0](https://developer.wordpress.org/reference/since/2.7.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fwp_clone%2F)
before being able to contribute a note or feedback.