An open API service indexing awesome lists of open source software.

https://github.com/krypt0nn/php-ndbg

PHP 5+ library to create debuggable code with native support without any extensions
https://github.com/krypt0nn/php-ndbg

debugging php

Last synced: 21 days ago
JSON representation

PHP 5+ library to create debuggable code with native support without any extensions

Awesome Lists containing this project

README

          

🚀 php-ndbg

**PHP Native Debug** is a library that gives you ability to generate native debugging code from original one

## Installation

```
composer require krypt0nn/php-ndbg
```

## Principle of work

The main idea is to add callbacks everywhere in code where the variables changes its values. For example

Original one

```php
$GLOBALS,
'line' => __LINE__,
'file' => __FILE__,
'function ' => __FUNCTION__,
'class' => __CLASS__,
'method' => __METHOD__,
'namespace' => __NAMESPACE__
]
```

And if some constant will contain empty string as a value (like callback was called from a function without class and there `__CLASS__` will be `''` (an empty string)) - it will be replaced as null value

So an example debug file will looks like

```php

Author: [Nikita Podvirnyy](https://vk.com/technomindlp)