3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types=1); /** * Trashes or deletes a post or page. * * When the post and page is permanently deleted, everything that is tied to * it is deleted also. This includes comments, post meta fields, and terms * associated with the post. * * The post or page is moved to Trash instead of permanently deleted unless * Trash is disabled, item is already in the Trash, or $force_delete is true. * * @since 1.0.0 * * @global wpdb $wpdb WordPress database abstraction object. * @see wp_delete_attachment() * @see wp_trash_post() * * @param int $post_id Optional. Post ID. Default 0. * @param bool $force_delete Optional. Whether to bypass Trash and force deletion. * Default false. * @return WP_Post|false|null Post data on success, false or null on failure. */ function wp_delete_post( $post_id = 0, $force_delete = false ) { echo '$post_id === '; var_dump( $post_id ); } wp_delete_post( '123' );

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
8.4.140.0110.00917.27
8.4.130.0110.01019.25
8.4.120.0380.00717.30
8.4.110.0490.01017.68
8.4.100.0430.00917.55
8.4.90.0260.00517.66
8.4.80.0190.00217.75
8.4.70.0170.00617.51
8.4.60.0390.00817.52
8.4.50.0240.00417.59
8.4.40.0390.01016.99
8.4.30.0300.00417.46
8.4.20.0460.00717.35
8.4.10.0390.00917.30
8.3.270.0090.01116.41
8.3.260.0120.00716.62
8.3.250.0470.00916.29
8.3.240.0210.00616.46
8.3.230.0240.00816.10
8.3.220.0420.00516.41
8.3.210.0300.00916.36
8.3.200.0420.00816.59
8.3.190.0420.00516.23
8.3.180.0230.00516.52
8.3.170.0190.00416.39
8.3.160.0410.00816.40
8.3.150.0440.00616.63
8.3.140.0390.00716.26
8.3.130.0390.00616.54
8.3.120.0260.00716.48
8.3.110.0280.00416.38
8.3.100.0390.00816.48
8.3.90.0480.00616.21
8.3.80.0440.00516.38
8.3.70.0400.00616.13
8.3.60.0420.00916.32
8.3.50.0410.01116.54
8.3.40.0340.01017.48
8.3.30.0310.00817.30
8.3.20.0290.00817.50
8.3.10.0200.00517.50
8.3.00.0110.00417.58
8.2.290.0280.00616.45
8.2.280.0280.00916.39
8.2.270.0350.00816.38
8.2.260.0370.01116.49
8.2.250.0320.01016.43
8.2.240.0390.00516.11
8.2.230.0320.00716.36
8.2.220.0320.00716.40
8.2.210.0170.00216.15
8.2.200.0200.00616.54
8.2.190.0250.00516.17
8.2.180.0380.00416.45
8.2.170.0370.01117.42
8.2.160.0420.00817.50
8.2.150.0310.00917.50
8.2.140.0160.00417.61
8.2.130.0350.01117.36
8.2.120.0380.00817.63
8.2.110.0400.00617.35
8.2.100.0270.00417.50
8.2.90.0230.00617.58
8.2.80.0280.01117.43
8.2.70.0330.01117.29
8.2.60.0310.00617.50
8.2.50.0180.00117.39
8.2.40.0220.00317.55
8.2.30.0290.00817.14
8.2.20.0320.00617.18
8.2.10.0300.00917.07
8.2.00.0400.01717.06

preferences:
27.7 ms | 403 KiB | 5 Q