View Issue Details

IDProjectCategoryView StatusLast Update
0000457XdebugUncategorizedpublic2020-03-12 17:16
Reportergiorgiosironi Assigned Toderick  
PrioritynormalSeverityfeatureReproducibilityalways
Status closedResolutionfixed 
Product Version2.0.0dev 
Summary0000457: var_dump() overloading from the command line
Description

When html_errors is not set in php.ini, the var_dump() overloading is not used. If set to On, an html dump is shown but it is inappropriate for usage from the command line. The overloading should be used without showing a html when html_errors is Off, resulting in a plain text dump.

Additional Information

Workaround:
#
public function dump($var)
#
{
#
ini_set('html_errors', 'On');
#
ob_start();
#
var_dump($var);
#
$dump = ob_get_contents();
#
ob_end_clean();
#
echo strip_tags(html_entity_decode($dump));
#
}
#

#
[16:54:23][giorgio@Marty:~/svn/doctrine2/tests]$ phpunit Doctrine/Tests/ORM/Functional/DetachedEntityTest.php
#
PHPUnit 3.3.17 by Sebastian Bergmann.
#
object(Doctrine\ORM\PersistentCollection)[180]
#
private '_type' => null
#
private '_snapshot' =>
#
array
#
empty
#
private '_owner' => null
#
private '_association' => null
#
private '_keyField' => null
#
private '_em' => null
#
private '_backRefFieldName' => null
#
private '_typeClass' => null
#
private '_isDirty' => boolean true
#
protected '_initialized' => boolean true
#
protected '_elements' =>
#
array
#
0 =>
#
object(Doctrine\Tests\Models\CMS\CmsPhonenumber)[181]
#
...
#
1 =>
#
object(Doctrine\Tests\Models\CMS\CmsPhonenumber)[182]
#
...

TagsNo tags attached.
Operating SystemUbuntu Linux 9.04
PHP Version5.3.0

Relationships

has duplicate 0000706 resolvedderick var_dump not overloaded in CLI when html_errors is off 

Activities

derick

2011-11-11 23:50

administrator   ~0001857

Implemented on github for 2.2dev.

Issue History

Date Modified Username Field Change
2009-07-27 16:07 giorgiosironi New Issue
2009-07-27 16:07 giorgiosironi Operating System => Ubuntu Linux 9.04
2009-07-27 16:07 giorgiosironi PHP Version => 5.3.0
2009-07-27 16:07 giorgiosironi Xdebug Version => 2.0.5
2011-11-11 23:50 derick Note Added: 0001857
2011-11-11 23:50 derick Status new => closed
2011-11-11 23:50 derick Assigned To => derick
2011-11-11 23:50 derick Resolution open => fixed
2014-02-27 19:11 derick Relationship added has duplicate 0000706
2020-03-12 16:55 derick Severity minor => feature
2020-03-12 17:16 derick Category Feature/Change request => Uncategorized