|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2007-07-13 04:26 UTC] tony2001 at phpclub dot net
[2013-02-18 00:35 UTC] pecl-dev at lists dot php dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 01:00:01 2025 UTC |
Description: ------------ HaruDoc class does not implement __toString() method so it is impossible for developers to look at its current internal information when do debugging. Reproduce code: --------------- <?php $doc = new HaruDoc(); $doc->setPageMode(HaruDoc::PAGE_MODE_USE_THUMBS); /* show thumbnails */ $page = $doc->addPage(); /* add page to the document */ $page->setSize(HaruPage::SIZE_A4, HaruPage::LANDSCAPE); /* set the page to use A4 landscape format */ $courier = $doc->getFont("Courier-Bold"); /* we'll use the bundled font a few lines below */ $page->setRGBStroke(0, 0, 0); /* set colors */ $page->setRGBFill(0.7, 0.8, 0.9); $page->rectangle(150, 150, 550, 250); /* draw a rectangle */ $page->fillStroke(); /* fill and stroke it */ $page->setDash(array(3, 3), 0); /* set dash style for lines at this page */ $page->setFontAndSize($courier, 60); /* set font and size */ $page->setRGBStroke(0.5, 0.5, 0.1); /* set line color */ $page->setRGBFill(1, 1, 1); /* set filling color */ $page->setTextRenderingMode(HaruPage::FILL_THEN_STROKE); /* fill and stroke text */ /* print the text */ $page->beginText(); $page->textOut(210, 270, "Hello World!"); $page->endText(); $doc->save(dirname(__FILE__)."/test.pdf"); /* save the document into a file */ echo $doc; // Cachable fatal error ?> Expected result: ---------------- It would be useful to see something useful when developer try to convert it into a string. Actual result: -------------- Cachable fatal error occurs.