gc_enabled example

                throw new \ErrorException($msg, 0, $type$file$line);
            }

            if ($this->prevErrorHandler) {
                return ($this->prevErrorHandler)($type$msg$file$line$context);
            }

            return false;
        });
        $this->filter = $filter;

        if ($gc = gc_enabled()) {
            gc_disable();
        }
        try {
            return new Data($this->doClone($var));
        } finally {
            if ($gc) {
                gc_enable();
            }
            restore_error_handler();
            $this->prevErrorHandler = null;
        }
    }

    public function __toString()
    {
        return md5(serialize($this->data));
    }

    /** * Remove items that link back to this before destroying this object */
    public function __destruct()
    {
        if (!gc_enabled())
        {
            unset($this->feed);
        }
    }

    /** * Get data for an item-level element * * This method allows you to get access to ANY element/attribute that is a * sub-element of the item/entry tag. * * See {@see SimplePie::get_feed_tags()} for a description of the return value * * @since 1.0 * @see http://simplepie.org/wiki/faq/supported_xml_namespaces * @param string $namespace The URL of the XML namespace of the elements you're trying to access * @param string $tag Tag name * @return array */
$options = new Options($this->dompdfOptions);

        $dompdf->setOptions($options);
        $dompdf->setPaper($document->getPageSize()$document->getPageOrientation());
        $dompdf->loadHtml($document->getHtml());

        /* * Dompdf creates and destroys a lot of objects. The garbage collector slows the process down by ~50% for * PHP <7.3 and still some ms for 7.4 */
        $gcEnabledAtStart = gc_enabled();
        if ($gcEnabledAtStart) {
            gc_collect_cycles();
            gc_disable();
        }

        $dompdf->render();

        $this->injectPageCount($dompdf);

        if ($gcEnabledAtStart) {
            gc_enable();
        }
                throw new \ErrorException($msg, 0, $type$file$line);
            }

            if ($this->prevErrorHandler) {
                return ($this->prevErrorHandler)($type$msg$file$line$context);
            }

            return false;
        });
        $this->filter = $filter;

        if ($gc = gc_enabled()) {
            gc_disable();
        }
        try {
            return new Data($this->doClone($var));
        } finally {
            if ($gc) {
                gc_enable();
            }
            restore_error_handler();
            $this->prevErrorHandler = null;
        }
    }

    public function __toString()
    {
        return md5(serialize($this->data));
    }

    /** * Remove items that link back to this before destroying this object */
    public function __destruct()
    {
        if (!gc_enabled())
        {
            if (!empty($this->data['items']))
            {
                foreach ($this->data['items'] as $item)
                {
                    $item->__destruct();
                }
                unset($item$this->data['items']);
            }
            if (!empty($this->data['ordered_items']))
            {
                
Home | Imprint | This part of the site doesn't use cookies.