On November 20, 2003 02:22 am, Andi Gutmans wrote:>
> Andi
>
> P.S.-If you think php_strip_whitespace() is misleading then see if you can
> find a better name. I think php_strip() is just too short and will be
> confused with strip() (which doesn't exist but still...)
> Looks much better now. Pleas
Looks much better now. Please make sure you test it well because it's quite
sensitive APIs you are using.
About the return value, I think it should return the error message or true
on success. Then people could use === to check what they got (I prefer that
over Markus' idea). Then again I'm not
On Wed, Nov 19, 2003 at 03:18:34PM -0500, Ilia Alshanetsky wrote :
> On November 19, 2003 02:40 pm, Markus Fischer wrote:
> > bool php_check_syntax($filename [, &$error_message]);
>
> I'll need to look at the code, it should be possible to do. Although I'd
> prefer to have it return the erro
Here is the revised patch. It is now much cleaner (no more lexer stuff) and
supports few additional features. By popular demand the functions have been
renamed to php_check_syntax() & php_strip_whitespace().
php_check_syntax() can now handle remote scripts and if a 2nd (optional)
argument is pa
On Wed, 19 Nov 2003, Andi Gutmans wrote:
>At 02:23 PM 11/19/2003 -0500, Ilia Alshanetsky wrote:
>> > IMHO it should be php_check_syntax() and not
>> > script_check_syntax() to make clear what it actualy
>> > checks (it won't check the syntax of my shell, awk
>> > or perl scripts, would it? ;)
>>
>
It should work out of the box.
--Wez.
> > As a sidenote, would streams be supported (http, ftp) ? Or are there
> > some kind of limitating factors?
>
> That should be possible as well.
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
On November 19, 2003 02:40 pm, Markus Fischer wrote:
> bool php_check_syntax($filename [, &$error_message]);
I'll need to look at the code, it should be possible to do. Although I'd
prefer to have it return the error rather then return it by reference as an
optional argument.
> As a
On Wed, Nov 19, 2003 at 11:24:56AM -0500, Ilia Alshanetsky wrote :
> Attached file, implements validate_file(), which implements a php space syntax
> check for PHP scripts. It returns a boolean true/false value indicating
> whether the script has parse errors or not. Essentially a "php -l" from
Andi Gutmans wrote:
At 02:23 PM 11/19/2003 -0500, Ilia Alshanetsky wrote:
> IMHO it should be php_check_syntax() and not
> script_check_syntax() to make clear what it actualy
> checks (it won't check the syntax of my shell, awk
> or perl scripts, would it? ;)
Good idea, we already have some fun
On November 19, 2003 02:44 pm, Andi Gutmans wrote:
> I hate the name lint and strip is kind of too short.
> Why not keep it long like Hartmut suggested such as php_check_syntax(),
> php_strip_whitespace()?
Those names are fine too (personally, I dislike overly long function names,
they are harder
At 02:23 PM 11/19/2003 -0500, Ilia Alshanetsky wrote:
> IMHO it should be php_check_syntax() and not
> script_check_syntax() to make clear what it actualy
> checks (it won't check the syntax of my shell, awk
> or perl scripts, would it? ;)
Good idea, we already have some function that utilize php_
At 08:11 PM 11/19/2003 +0100, Hartmut Holzgraefe wrote:
Ilia Alshanetsky wrote:
script_* is good, I have no naming preference. I am more interested to
know whether this functionality is something we need or not...
it is not needed, you can just do
system("php -l filename");
instead ;)
actuall
On Wed, Nov 19, 2003 at 02:23:44PM -0500, Ilia Alshanetsky wrote:
> Good idea, we already have some function that utilize php_ prefix, might as
> well continue with the trend. How about php_lint() & php_strip()?
php_lint() sounds goodr, and I'm cool with either php_strip() or
php_strip_whitespa
On November 19, 2003 02:11 pm, Hartmut Holzgraefe wrote:
> Ilia Alshanetsky wrote:
> > script_* is good, I have no naming preference. I am more interested to
> > know whether this functionality is something we need or not...
>
> it is not needed, you can just do
>
>system("php -l filename");
>
Ilia Alshanetsky wrote:
script_* is good, I have no naming preference. I am more interested to know
whether this functionality is something we need or not...
it is not needed, you can just do
system("php -l filename");
instead ;)
actually i would love to have php_check_syntax() as
it would si
On November 19, 2003 01:33 pm, Andi Gutmans wrote:
> If we're talking about naming the how about script_*?
script_* is good, I have no naming preference. I am more interested to know
whether this functionality is something we need or not...
Ilia
--
PHP Internals - PHP Runtime Development Maili
At 05:30 PM 11/19/2003 +0100, Jan Lehnardt wrote:
Hi,
On 19 Nov 2003, at 17:24, Ilia Alshanetsky wrote:
Any comments?
I find that useful for something I am writing right now and I was about to
propose that myself :). I'd go for php_check_syntax() or at least
file_validate() and php_strip_whitespace
I think it's a very bad idea to start copying lexer code into basic_functions.c
I don't have time to look into it but there must be a cleaner way of doing it.
Andi
At 11:24 AM 11/19/2003 -0500, Ilia Alshanetsky wrote:
Attached file, implements validate_file(), which implements a php space
syntax
Hi,
On 19 Nov 2003, at 17:24, Ilia Alshanetsky wrote:
Any comments?
I find that useful for something I am writing right now and I was about
to
propose that myself :). I'd go for php_check_syntax() or at least
file_validate() and php_strip_whitespace() or at least
file_strip_whitespace(), but that'
19 matches
Mail list logo