---
date: 2020-11-13
id: 62a9d222-f5a2-4131-8de7-be1b071cab26
title: get~debugtype~()
---

# Description

Returns the variable type. Differnce with `getttype()` is that
`get_debug_type()` is more specific. See RFC[^1].

# Syntax

``` php
namespace Foo;

class Bar
{
}

$bar = new Bar();

echo gettype($bar)."\n"; // Object
echo get_debug_type($bar); // Foo\Bar
```

# Footnotes

[^1]: <https://wiki.php.net/rfc/get_debug_type>
