Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:40386 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 12650 invoked from network); 9 Sep 2008 00:50:38 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 Sep 2008 00:50:38 -0000 Authentication-Results: pb1.pair.com smtp.mail=guilhermeblanco@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=guilhermeblanco@gmail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.44.30 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: guilhermeblanco@gmail.com X-Host-Fingerprint: 74.125.44.30 yx-out-2324.google.com Received: from [74.125.44.30] ([74.125.44.30:12802] helo=yx-out-2324.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 8B/F2-32333-958C5C84 for ; Mon, 08 Sep 2008 20:50:35 -0400 Received: by yx-out-2324.google.com with SMTP id 3so993679yxj.83 for ; Mon, 08 Sep 2008 17:50:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type:content-transfer-encoding :content-disposition; bh=i197b7mM3GeEm+aCsJwSr4BznCUFUFdtBpwIiqyzNrU=; b=UBq52jVjl+j2C7xWpNmWvu8dh3aFHBWT0yOwT8VQVq2WgXpofo3nY9kBDj1fSOqd12 D+oKwfO3XpC1Opyc9NHb/8RyhxBbgAtUs3FMpaYFhqmD0MnSdQmnTsnaz/xoJD4Y5B5b E95me0Gxb/xi9IMte9kWawFMq97YvGg2i4E14= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type :content-transfer-encoding:content-disposition; b=tQOQzTPAhPVxzk22nSX77CGnmxUuSrMWcFW0UHizPUHIe3zvveO9fjhA5DqhA9Ym8F 5AqpEE7RXiuW4lzl2ntWxnAOeVQhA7Na3moGNMlgbV5o5NqYcBX1J1eL2q79/tHDgr1J saZAzK8QM57ILXSem9rj/QWTHxzzxi/864ars= Received: by 10.141.163.12 with SMTP id q12mr9273958rvo.265.1220921430426; Mon, 08 Sep 2008 17:50:30 -0700 (PDT) Received: by 10.141.63.14 with HTTP; Mon, 8 Sep 2008 17:50:30 -0700 (PDT) Message-ID: Date: Mon, 8 Sep 2008 21:50:30 -0300 To: "PHP Internals" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline Subject: Suggestion to increase the max_input_nesting_level From: guilhermeblanco@gmail.com ("Guilherme Blanco") Hi ML, Short version: Increase the default max_input_nesting_level from 100 to something > 150. Extended version: I am working on a Compiler written for PHP. Before you criticize me, let me explain the entire situation. I work for Doctrine project. Currently we're refactoring the DQL (Doctrine Query Language) compiler, which processes our SQL-similar language and convert it into a valid SQL statement for the driver being used. If you want a comparative, our approach is inspired in known OQL, like JPQL of Hibernate in Java. One example: SELECT u FROM User u It'll be converted into something like: SELECT u.id AS u__id, u.name AS u__name, u.passwd AS u_passwd, u.email AS u__email FROM user u Please notice this is a very simple example, but highlights how does it work. Currently I'm working on the compiler, which has this BNF: http://trac.doctrine-project.org/browser/trunk/query-language.txt I've done a lot of optimizations to be able to not touch the default nesting input level, but doing that I added a lot of restrictions that now are my bottlenecks. With all these optimizations, it currently reaches ~70. I made a lot of tests and the queries usually reaches 103... some complex ones reached ~140 nested calls. I know PHP was not structured to build compilers, and also I know this property can be overrided (many users do not have access to it), but I think for this situation it worth a consideration. Also, it's not a simple change for only one user, since our code usage is very large. My suggestion is to increase to something like 180, available since PHP 5.3. I'd like to know your thoughts about this subject. Thanks in advance, Best regards, -- Guilherme Blanco - Web Developer CBC - Certified Bindows Consultant Cell Phone: +55 (16) 9166-6902 MSN: guilhermeblanco@hotmail.com URL: http://blog.bisna.com Rio de Janeiro - RJ/Brazil