PHPackages                             stopsopa/envext - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Debugging &amp; Profiling](/categories/debugging)
4. /
5. stopsopa/envext

ActiveLibrary[Debugging &amp; Profiling](/categories/debugging)

stopsopa/envext
===============

Debugging tools based on symfony VarDumper Component to install locally on dev machine

v1.0.4(9y ago)061[1 issues](https://github.com/stopsopa/envext/issues)MITPHP

Since Sep 7Pushed 8y ago1 watchersCompare

[ Source](https://github.com/stopsopa/envext)[ Packagist](https://packagist.org/packages/stopsopa/envext)[ RSS](/packages/stopsopa-envext/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependencies (1)Versions (7)Used By (0)

Deprecated because now it is implemented natively in xdebug and in symfony/var-dumper symfony module.
=====================================================================================================

[](#deprecated-because-now-it-is-implemented-natively-in-xdebug-and-in-symfonyvar-dumper-symfony-module)

[![Latest Stable Version](https://camo.githubusercontent.com/bd215569d8608ebef12016bd21acff77ce037b398918da4f69605cf94ce6537f/68747470733a2f2f706f7365722e707567782e6f72672f73746f70736f70612f656e766578742f762f737461626c65)](https://packagist.org/packages/stopsopa/envext)

Inspiration
===========

[](#inspiration)

Annotation from VarDumper Component documentation [link](http://symfony.com/doc/current/components/var_dumper.html) :

[![ScreenShot](https://raw.githubusercontent.com/stopsopa/envext/master/inspiration.bmp)](https://raw.githubusercontent.com/stopsopa/envext/master/inspiration.bmp)

For God's sake, why this library?
=================================

[](#for-gods-sake-why-this-library)

Normal dump() function prints variable, but usually it's not enough. Line of execution function dump() is sometimes even more usefull information, especially when You debug something by placing more then one dump() in code and later wants to get rid all of them.

Example:

[![ScreenShot](https://raw.githubusercontent.com/stopsopa/envext/master/web.bmp)](https://raw.githubusercontent.com/stopsopa/envext/master/web.bmp)

Usage
=====

[](#usage)

This library provides two functions "d()" and "dd()":

- function d() prints data and terminate script by die()
- function dd() prints data and allows script to continue

Installation without including to project
=========================================

[](#installation-without-including-to-project)

```
sudo -i

cd /bin

composer require stopsopa/envext:dev-master

```

add to php.ini (http and cli mode) (/etc/php.ini for centos):

```
auto_prepend_file = /bin/vendor/autoload.php

```

setup nginx (usually somewhere in /etc/nginx/sites-enabled/default.conf) ...

```
location ~ \.php$ {
    fastcgi_pass unix:/var/run/php5-fpm.sock;
    fastcgi_index app.php;
    include fastcgi_params;
    fastcgi_intercept_errors on;
    fastcgi_param PHP_VALUE "auto_prepend_file = /bin/vendor/autoload.php";
}

```

.. or setup apache2

```

    AllowOverride none
    Require all denied
    Php_value auto_prepend_file /bin/vendor/autoload.php

```

restart nginx/apache (... or other http server)

centos

```
/etc/init.d/nginx restart
sudo apachectl restart

```

ubuntu

```
sudo service nginx restart
sudo service apache2 restart

```

Test
====

[](#test)

cli

```
echo '
