---
title: "(Advanced) How to tell if an entry is a revision in PHP"
date: 2026-04-23
author: "GravityKit"
link: "https://www.gravitykit.com/docs/gravityrevisions/determine-if-entry-is-revision/"
---

GravityRevisions have a custom entry status that you can check against in your code.

The easiest way to check whether an entry is a revision is to compare it against that status:

```

$entry = GFAPI::get_entry( 1234 ); // Replace '1234' with your own Entry ID

if( 'gv-revision' === $entry['status'] ) {
	// This entry is actually a revision!
}
```

```

$entry = GFAPI::get_entry( 1234 ); // Replace '1234' with your own Entry ID

if( 'gv-revision' === $entry['status'] ) {
	// This entry is actually a revision!
}
```

Read here how to add these code samples to your website: [Where to put code samples.](https://www.gravitykit.com/docs/gravityview/customizing-your-views/where-to-put-code-samples/)