Zend\Text\Table\Table not creating a table.

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Zend\Text\Table\Table not creating a table.

rkulagow
This post has NOT been accepted by the mailing list yet.
I've been using the class without issue, but I have one particular user where rather than printing a table, the script just seems to abort.

To simplify, I've used the example code in the class, and it's also failing.

$ cat zendtest.php
#!/usr/bin/php

<?php

require_once "vendor/autoload.php";

#$table = new Zend\Text\Table\Table(array('columnWidths' => array(10, 20)));
$table = new Zend\Text\Table\Table(array('columnWidths' => array(10, 20), "decorator"=>"ascii"));

// Either simple
$table->appendRow(array('Zend', 'Framework'));

// Or verbose
$row = new Zend\Text\Table\Row();

$row->appendColumn(new Zend\Text\Table\Column('Zend'));
$row->appendColumn(new Zend\Text\Table\Column('Framework'));

$table->appendRow($row);

echo $table;

When the user runs the script, they just go right back to the command prompt.

php composer.phar show -i

shows that they have v2.0.8

Is there anything I can do to troubleshoot why they can't even get the basic table to do anything?