cebe / markdown

A super fast, highly extensible markdown parser for PHP

Home Page:http://markdown.cebe.cc/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Getting Fatal error Out of memory on ReflectionClass

PavelD opened this issue · comments

Hi,

The Parser::blockTypes() use $this->_blockTypes array. Is it possible to do the same pattern in Parser::inlineMarkers()?

The reflection is costly operation and I'm getting Fatal error when parsing more texts in the row.

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 20480 bytes) in /var/www/html/vendor/cebe/markdown/Parser.php on line 275

Sorry, my mistake. i overlooked bug in my code and it was failing in yours.

But getting list of inline parsers should be somehow cached anyway.

Please close the issue then. Thanks.