Hi,
it seems that the filter ext is getting fast tracked into 5.1.x
I just want to make sure that we are all on the same page on this topic ..
In what form would it be added to core? I presume it would be marked as
experimental? Has the doc team jumped on it yet?
regards,
Lukas
--
PHP Intern
Looking for some feedback on what the expected behavior should be for class
and/or constant ambiguity within namespaces. For instance:
Classes.php:
namespace A {
const FOO = 123;
class Bar { . }
class FooBaz { . }
}
namespace B {
const FOO = 456;
class Bar { .
I loved Joao Cruz Morais idea of using the 'as' keyword in this:
while (true) as outer_cycle {
$i = 0;
while (true)
if($i++ == 10) break outer_cycle;
}
I think it's really clear and with this syntax you (at least in my opinion)
kinda loose the feeling of needing all caps for a label name
Elegant solution, however, I'd prefer while(true) FOO { }.
while FOO(true) {} looks like a function call...
On 11/30/05, Sara Golemon <[EMAIL PROTECTED]> wrote:
> But first, this word from our sponsor:
> Group A wants anything resembling goto to burn in the fires of hell
> Group B wants full non-
Hi folks,
I just got on the list -- I've been a big fan of PHP for several
years and am throughly enjoying PHP 5. Good work folks, and once I
can get 5.1 set up on my OS X box I'm sure it's be even better.
I've been very interested in hearing about PHP 6 feature discussions,
and the meeti
It occured to me on the way onto the train that this construct doesn't
need pass_two(). When I get home to more bandwidth I'll cook up a
simplified version that resolves break distance in zend_do_brk_cont() and
frees the labels in do_end_loop().
Okay, simpler/leaner implementation now availab
I guess I fall into Group B, and I must say that I'd prefer either to
see goto/jump like construct or nothing at all. Be it a crippled
goto/jump or labeled breaks. So, my vote is a -1.
Ilia
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.ph
Hello, I represent group B (not in any way officially or anything else
that might give my words an iota of weight), but I (*cough cough*) WE
think that the above break system would make a terrible system for
finite state machines.
Good, 'cause that's not its purpose. This doesn't supplant GOTO o
Hello Sara,
nice work, clean patch, good solution - thanks! what more can one
say?
commit? :)
Oh how you both love to tease me :p
It occured to me on the way onto the train that this construct doesn't need
pass_two(). When I get home to more bandwidth I'll cook up a simplified
version t
On Wed, 30 Nov 2005 02:52:59 +0100
[EMAIL PROTECTED] (Marcus Boerger) wrote:
> Hello Sara,
>
> nice work, clean patch, good solution - thanks! what more can one
> say?
commit? :)
--Pierre
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub
Hello Sara,
nice work, clean patch, good solution - thanks! what more can one say?
best regards
marcus
p.s.: I'll have the thousands of replies on this thread on ignore :-)
Wednesday, November 30, 2005, 2:40:32 AM, you wrote:
> But first, this word from our sponsor:
> Group A wants anything
On Tue, 2005-11-29 at 20:40, Sara Golemon wrote:
> But first, this word from our sponsor:
> Group A wants anything resembling goto to burn in the fires of hell
> Group B wants full non-crippled goto or nothing at all
> Group C wants partial goto (non-backward jumping) or nothing at all
> Groups B a
But first, this word from our sponsor:
Group A wants anything resembling goto to burn in the fires of hell
Group B wants full non-crippled goto or nothing at all
Group C wants partial goto (non-backward jumping) or nothing at all
Groups B and C both (generally) want it called either GOTO or JUMP, n
I'm sorry if I'm saying something that was already proposed, but why
not use the Java approach to labeled breaks or something like this
(dumb) example:
while(true) as outer_cycle {
$i = 0;
while(true)
if($i++ == 10) break outer_cycle;
}
Regards,
João C Morais
On 11/29/05, Sara Golemon <
Jacques Marneweck wrote:
Should we perhaps have the php museum site have it's own CVS repository
so we can manually do this on our side?
I don't think having a gigabyte of museum data is going to be nice to
our CVS server.
Edin
--
PHP Internals - PHP Runtime Development Mailing List
To unsu
Hi Gabor,
The museum is now up-to-date.
Edin
Gabor Hojtsy wrote:
Hi,
It would be really nice for our php.net mirrors if the PHP Museum would
include some more past releases of PHP. The latest in the Museum are
4.3.9RC1 and 5.0.1, which means that the mirrors need to host all
version up from
If you're having that problem that a request variable is being reported
as an integer, I suggest using var_dump(). That function will tell you
the type and contents of a variable. For example:
$bool = true;
$int = 1;
$float = 1.0;
$str = 'abc';
$array = array();
var_dump($bool, $int, $float,
So when you said "and somebody enters, say "jkhdsjh" into the form, is_int()
returns 1" you were not really saying it as it was?
$var = "jkhdsjh";
is_int($var) should _not_ result in true. i figured you were talking about a
true bug here...
Ron
"Gareth Ardron" <[EMAIL PROTECTED]> wrote in messa
Ben Litton wrote:
>
> You could always do an is_numeric and if it returns true, cast it as an
> int.
That is the way it's meant to be done.
is_int() really checks for the dataTYPE and not the CONTENTS (of course
the contents depend on the type, e.g. in an int you won't find a string).
giving i
On Tue, 29 Nov 2005 12:53:47 -0500, "Sara Golemon" <[EMAIL PROTECTED]> wrote:
is_numeric will test if it's a numeric string. Maybe is_int should do
the same, but apparently it doesn't.
What on earth for?
If you want content, do is_numeric(). If you want type, do is_int()
Simple.
-Sa
Stefan Esser wrote:
Please move the discussion to php general mailinglist. This is a
usererror, a misunderstanding of is_int vs. is_numeric.
My bad therefore, misunderstanding of the docs as you say.
Not sure I think it's entirely sane, but feh - it's been a long day,
what do I know, etc etc.
Please move the discussion to php general mailinglist. This is a
usererror, a misunderstanding of is_int vs. is_numeric.
The documentation clearly states, that
is_numeric - Finds whether a variable is a number or a numeric string
is_int - Find whether a variable is an integer
anything within $_R
is_numeric will test if it's a numeric string. Maybe is_int should do the
same, but apparently it doesn't.
What on earth for?
If you want content, do is_numeric(). If you want type, do is_int()
Simple.
-Sara
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit:
Ben Litton wrote:
is_numeric will test if it's a numeric string. Maybe is_int should do
the same, but apparently it doesn't.
You could always do an is_numeric and if it returns true, cast it as an
int.
Or use: www.php.net/ctype_digit
Ciao ciao
--
Matteo Beccati
http://phpadsnew.com
http://
is_numeric will test if it's a numeric string. Maybe is_int should do the
same, but apparently it doesn't.
You could always do an is_numeric and if it returns true, cast it as an
int.
On Tue, 29 Nov 2005 12:42:10 -0500, Gareth Ardron <[EMAIL PROTECTED]>
wrote:
Matteo Beccati wrote:
Ga
My objection to goto is based on the fact that it allows to randomly
transfer control between arbitary points of script, which can (and
will) easily lead to spaghetti code and actually promotes this style of
writing code.
Yes, I agree... Exceptions cause exactly that kind of confus...oh..wait...
Matteo Beccati wrote:
Gareth Ardron wrote:
Ron Korving wrote:
Just out of curiosity, to which versions does this apply?
5.1.0b3->5.1.1 at least. Haven't got anything older to test on.
As far as I know request variables have always been strings, and
is_int() checks the variable type, no
Gareth Ardron wrote:
Ron Korving wrote:
Just out of curiosity, to which versions does this apply?
5.1.0b3->5.1.1 at least. Haven't got anything older to test on.
As far as I know request variables have always been strings, and
is_int() checks the variable type, not its content.
I wonder h
Antony Dovgal wrote:
And PHP from .deb too?
*That* could be a problem.
God no, If I was doing that, I wouldn't report the bug here :)
Can give you the configure line if it'll help?
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
On 29.11.2005 20:22, Gareth Ardron wrote:
Antony Dovgal wrote:
./sapi/cli/php -r 'var_dump(is_int("jkhdsjh"));'
bool(false)
./sapi/cli/php -v
PHP 5.1.2-dev (cli)
What am I doing wrong?
well that's interesting.
I think it's something to do with the way the var is passed - so could
even be
Ron Korving wrote:
Just out of curiosity, to which versions does this apply?
5.1.0b3->5.1.1 at least. Haven't got anything older to test on.
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
Florian Anderiasch wrote:
Gareth Ardron wrote:
Hi.
Think I've just stumbled upon a possible bug with is_int.
Hello Gareth,
if I'm not mistaken, $_REQUEST['days'] is a string, and unless you use
if (!is_int(intval($_REQUEST['days'])) || $_REQUEST['days'] < 0) {
I see no problem in is_int ta
./sapi/cli/php -r 'var_dump(is_int("jkhdsjh"));'
bool(false)
./sapi/cli/php -v
PHP 5.1.2-dev (cli)
What am I doing wrong?
On 29.11.2005 18:57, Gareth Ardron wrote:
Hi.
Think I've just stumbled upon a possible bug with is_int.
if you've got the following code:
days::".$_REQUEST['days'];
Gareth Ardron wrote:
> Hi.
>
> Think I've just stumbled upon a possible bug with is_int.
Hello Gareth,
if I'm not mistaken, $_REQUEST['days'] is a string, and unless you use
if (!is_int(intval($_REQUEST['days'])) || $_REQUEST['days'] < 0) {
I see no problem in is_int taking a string with numeral
On 29 November 2005 15:27, Sara Golemon wrote:
> > Just wondering. There's another thread about goto and labels
> > running as well. If they vote for something like:
> >
> > LABEL:while (cond) {
> >
> > }
> >
> > Wouldn't this add another technical diffuculty with using ':' as a
> > namespace s
I'm not sure I understand this problem. Isn't it doable to define
defines at runtime and then put them under a certain namespace? I'm
assuming namespaces are defined before defines?
Ideally, I'd say there should be no code limitations inside namespaces.
But if this poses technical problems. Th
SG>>random than a catch statement. It's a deliberate, directed statement, and
SG>>one which *does* clean up after itself despite your unfounded claims to the
SG>>contrary.
My objection to goto is based on the fact that it allows to randomly
transfer control between arbitary points of script, whi
Just out of curiosity, to which versions does this apply?
Ron
"Gareth Ardron" <[EMAIL PROTECTED]> schreef in bericht
news:[EMAIL PROTECTED]
> Hi.
>
> Think I've just stumbled upon a possible bug with is_int.
>
> if you've got the following code:
>
>
>
>
>
> if (!is_int($_REQUEST['days']) |
Hi.
Think I've just stumbled upon a possible bug with is_int.
if you've got the following code:
days::".$_REQUEST['days'];
?>
and somebody enters, say "jkhdsjh" into the form, is_int() returns 1,
thereby not setting the $_REQUEST['days'] variable to 10 - if I switch
to using is_numeric t
Done.
On 11/29/05, Israel Alpert <[EMAIL PROTECTED]> wrote:
> Can somebody help me stop the flood of income e-mails from PHP?
>
> I've signed to the newsletter and, during the last two month, made many
> attempts to "unsubscribe" - none works and I am getting 100's of e-mails
> from you.
>
> Pleas
It is clear from technical point. It is not clear from structural view,
since it can be any random place in code, not connected to the previos
place in any logical way.
Are you deliberately trying to be antagonistic? A goto label is no more
random than a catch statement. It's a deliberate, dir
Matthias,
Simply put, const != define. Like I think Sara mentioned before, defines are
runtime-defined, and making it both compile-time/runtime defined based on
context will be really confusing.
Also, I'm not accepting variables in namespaces and this is not needed
either. So, yes, this is outsid
Can somebody help me stop the flood of income e-mails from PHP?
I've signed to the newsletter and, during the last two month, made many
attempts to "unsubscribe" - none works and I am getting 100's of e-mails
from you.
Please take me off the mailing list!
Israel "Oulik" Alpert
-Original Me
Can somebody help me stop the flood of income e-mails from PHP?
I've signed to the newsletter and, during the last two month, made many
attempts to "unsubscribe" - none works and I am getting 100's of e-mails from
you.
Please take me off the mailing list!
Israel "Oulik" Alpert
--
PHP Interna
Can somebody help me stop the flood of income e-mails from PHP?
I've signed to the newsletter and, during the last two month, made many
attempts to "unsubscribe" - none works and I am getting 100's of e-mails
from you.
Please take me off the mailing list!
-Original Message-
From: Lukas S
hi Stanislav,
Stanislav Malyshev wrote:
LS>>How is that different from "goto"?
I start to suspect you just skip what I am writing. Didn't I explain that
exception does not allow to jump to random points and goto does?
LS>>And if you can jump through 80% if your code via an exception while y
Just wondering. There's another thread about goto and labels running as
well. If they vote for something like:
LABEL:while (cond) {
}
Wouldn't this add another technical diffuculty with using ':' as a
namespace seporator?
Fortunately this is another new feature so there's no old code to bre
Stanislav Malyshev wrote:
EK>>This might be from implementation/engine point of view, but from user's
EK>>perspective goto is much more limited. It can only happen within one
EK>>function.
That's good. PHP is a limited language - you can not do many things in PHP
that you can do in C, for examp
Stanislav Malyshev wrote:
> Exceptions are structured way of handling code flow - you can not get to
> random points of code with exception, you can get either to enclosing
> catch or stop the program entirely. Unlike exceptions, goto allows to
> jump to a random point of code. I don't know what
Stanislav Malyshev wrote:
HH>>a small objection here: with a GOTO it is clear where execution continues,
HH>>you can simply search for the label the GOTO is using. With exceptions on
It is clear from technical point. It is not clear from structural view,
since it can be any random place in code
HH>>a small objection here: with a GOTO it is clear where execution continues,
HH>>you can simply search for the label the GOTO is using. With exceptions on
It is clear from technical point. It is not clear from structural view,
since it can be any random place in code, not connected to the previ
Stanislav Malyshev wrote:
LS>>How is that different from "goto"?
I start to suspect you just skip what I am writing. Didn't I explain that
exception does not allow to jump to random points and goto does?
You are argue on technical/internals terms. I agrue that what is
"defined" and "clear"
Oliver Grätz wrote:
Nope. Parentheses are a totally different thing here. Adding mandatory
whitespace means giving syntactic meaning to something that normally
never should have it. Meaningful whitespace is really evil. On the other
side parentheses are already there. They are an existing concept
It may be so that you can use exceptions as a sort of goto mechanism.
And from some perspective you may even find some similarities. However,
exceptions weren't invented for this purpose. (And they aren't
introduced into PHP for this reason.)
The main difference is that exceptions work with
Stanislav Malyshev wrote:
Precentage of code that lies between throw point and catch point has
nothing to do with anything. The structure of the code - that you
always know which block encloses the code with exception potential and which code
would handle the exception if it arises - has everyt
Exactly, I don't see why people are mixing up the two in this discussion. I
think everybody can agree that a labeled break would really add something to
PHP. goto is a totally different story that should be discussed parallel to
labeled break. It is _not_ the same thing and the two can co-exist
Stanislav Malyshev wrote:
> LS>>discussions over the past months it seemed to me that the "goto all the
> way"
> LS>>camp was fine with limiting jumping to the current scope (function/method)
>
> That doesn't do much. That's like saying "access not to all memory but
> only memory space of the pr
Stanislav Malyshev wrote:
Exceptions are structured way of handling code flow - you can not get to
random points of code with exception, you can get either to enclosing
catch or stop the program entirely. Unlike exceptions, goto allows to
jump to a random point of code.
a small objection her
LS>>How is that different from "goto"?
I start to suspect you just skip what I am writing. Didn't I explain that
exception does not allow to jump to random points and goto does?
LS>>And if you can jump through 80% if your code via an exception while you
LS>>unwind the stack it might be ordered
EK>>This might be from implementation/engine point of view, but from user's
EK>>perspective goto is much more limited. It can only happen within one
EK>>function.
That's good. PHP is a limited language - you can not do many things in PHP
that you can do in C, for example. Many of these things usu
Stanislav Malyshev wrote:
No, they are not. If you don't purposedly abuse it, exceptions are a
structured way to handle exceptional situations, with well-defined effects
and known control points. They won't allow you to randomly jump around the
code.
How is that different from "goto"?
And i
LS>>discussions over the past months it seemed to me that the "goto all the way"
LS>>camp was fine with limiting jumping to the current scope (function/method)
That doesn't do much. That's like saying "access not to all memory but
only memory space of the process". Sure, you can't just jump rando
Stanislav Malyshev wrote:
LS>>a scope limited goto will never be close as dangerous for spagetti
LS>>code as exceptions already are because they are not scope limited.
Exceptions are structured way of handling code flow - you can not get to
random points of code with exception, you can get eit
> Von: Jessie Hernandez
> So, the question is, can we scrap both namespace constants
> and namespace functions and just stay with classes (as was
> agreed on several months ago, Andi himself agreeing to it)?
...
> I think this is the best solution thus far. If any one of you
> still feels a n
Just wondering. There's another thread about goto and labels running as
well. If they vote for something like:
LABEL:while (cond) {
}
Wouldn't this add another technical diffuculty with using ':' as a
namespace seporator?
Oliver Grätz wrote:
Lukas Smith schrieb:
Oliver Grätz wrote:
I agree.
Although there's aanother thread running about namespaces that are about
to do something with ':' as well. Watch out that there aren't conflicts?
Ron Korving wrote:
I agree. Like you I couldn't really care about a 'goto', I'd probably never
use it. But labeled breaks would really ad
Lukas Smith schrieb:
> Oliver Grätz wrote:
>
>
>>one absolutely needs to use namespaces inside the ternary. As such cases
>>will be pretty rare, this is no big drawback. The good thing: no
>>whitespace magic is needed!
>
>
> so you replace the need for whitespace magic with the need for
> pare
I agree. Like you I couldn't really care about a 'goto', I'd probably never
use it. But labeled breaks would really add something to the language. The
current break counters aren't very user friendly if you ask me.
I'm very much in favor of:
LABEL: while (cond)
{
...
break LABEL;
...
}
I
On 29 November 2005 09:18, Bart de Boer wrote:
> I feel we're comparing apples with oranges here.
>
> Break; is for breaking out of loops. It shouldn't have anything to do
> with jumping to somewhere else. Let's say *if* PHP supported jumping
> through the code. The following should then be two d
I feel we're comparing apples with oranges here.
Break; is for breaking out of loops. It shouldn't have anything to do
with jumping to somewhere else. Let's say *if* PHP supported jumping
through the code. The following should then be two different things:
while (loop) {
goto LABEL;
}
:LAB
MB>>work that is worth nothing you should simply try to come up with a working
MB>>patch using a working separator which can clearly only be "\".
That's one creative way of using "working", "clearly" and "only" with
meanings that I was not familiar with before. :)
--
Stanislav Malyshev, Zend Pr
LS>>a scope limited goto will never be close as dangerous for spagetti
LS>>code as exceptions already are because they are not scope limited.
Exceptions are structured way of handling code flow - you can not get to
random points of code with exception, you can get either to enclosing
catch or s
Oliver Grätz wrote:
Here's the idea: When the tokenizer encounters the opening "?" of the
ternary, it DEACTIVATES the namespace operator until the end of the
ternary. This way, all old code will behave as before, nothing will be
broken. Of course, this absolutely requires the use of parentheses i
73 matches
Mail list logo