>>> is called a logical right shift (in contrast to the arithmetic right shift
>>> >>). This would be a good addition.
$op1 >>> $op2 is equivalent to ($op1 >> $op2) & (PHP_INT_MAX >> $op2 - 1)
== Original ==
From: Leigh
To: internals@lists.php.net
Date: Tue, 03 Feb 2015 14:24:07
eful and well thought out addition to me. Like
> array_column itself, it's easily implemented (and, indeed, emulated) in
> userland, but having it in the standard library helps everyone have the
> same version out of the box.
>
I agree. This is probably the most-asked-for update to array_column() that
I hear, and I haven't had time to implement it, so this is great.
Cheers,
Ben
say it would have been more difficult to fail!
> Huge thanks to them.
>
> Cheers,
> Bilge
Great RFC, Bilge! I was already on-board after the introduction, but if I had
any doubts, the examples in the appendix sold me.
Cheers,
Ben
signature.asc
Description: Message signed with OpenPGP
Since the folks who do the DockerHub builds already have all the infrastructure
set up to maintain the images, I think it might be easier to work with them to
have them provide debug builds.
Perhaps there’s someone from that team on this list who can speak to that?
Cheers,
Ben
signature.asc
Description: Message signed with OpenPGP
> On Sep 2, 2024, at 18:53, Bob Weinand wrote:
>
> On 3.9.2024 01:44:21, Ben Ramsey wrote:
>>> On Sep 2, 2024, at 08:11, Go Kudo wrote:
>>>
>>> Hi Internals.
>>>
>>> PHP currently does not provide official container images. Given that
&g
> On Sep 2, 2024, at 19:36, Bob Weinand wrote:
>
> On 3.9.2024 02:18:30, Ben Ramsey wrote:
>>> On Sep 2, 2024, at 18:53, Bob Weinand wrote:
>>>
>>> On 3.9.2024 01:44:21, Ben Ramsey wrote:
>>>
>>>>> On Sep 2, 2024, at 08:11, Go Kudo
take too much time for anyone
to answer!
Thanks!
Ben.
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
On 10/04/12 5:42 PM, Stefan Marr wrote:
Hi Ben:
On 10 Apr 2012, at 03:34, Ben Schmidt wrote:
During the flattening process, is a copy made of the trait code (or
bytecode or whatever)?
Thanks to Dmitry, the op_array, i.e., the methods op codes are not
copied but shared between the methods
short term. :-)
At any rate, Stefan has confirmed that there isn't code duplication
behind the scenes, so it's not an issue!
Smiles,
Ben.
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
Hi all,
I've written a draft version of an RFC for pull request 56 (
https://github.com/php/php-src/pull/56 ), to add array_column() to the
core. Please take a look and provide feedback so that I can improve the
patch/proposal.
https://wiki.php.net/rfc/array_column
Thanks,
Ben
-
nd RoR).
I'm open to changing or aliasing the name to array_pluck(), if others
are in agreement.
-Ben
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
>>> names=[guy['name'] for guy in stooges]
>>> print names
['moe', 'larry', 'curly']
array_column/pluck in PHP would do the same:
$names = array_column($stooges, 'name');
If other languages/frameworks/libraries are usi
we're both somewhat
stuck with no clue how to proceed with this.
Thanks,
Ben Ramsey
I'm having a major problem with my PHP scripts getting stuck on one of
our production servers.
The system runs normally for a while, but after some time, certain httpd
processed get wedged. This cause
().
For the second part, here's what my co-worker sent me:
/usr/include$ grep F_SETFD `find . -type f`
./asm/fcntl.h:#define F_SETFD 2 /* set/clear
close_on_exec */
./bits/fcntl.h:#define F_SETFD 2 /* Set file descriptor
flags. */
--
Ben Ramsey
8066c34 in ap_graceful_stop_signalled ()
#40 0x08066ed9 in ap_graceful_stop_signalled ()
#41 0x08067570 in ap_mpm_run ()
#42 0x0806da4f in main ()
(gdb)
[/snip]
--
Ben Ramsey
http://benramsey.com/
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
support.
As I understand it, the "RedHat" version of PHP they are using may have
an old version number, but it contains all security patches up to the
current version of PHP (though I'm unclear whether those patches include
any new features, etc.).
--
Ben Ramsey
http://benramsey.com/
n the past?
--
Ben Ramsey
http://benramsey.com/
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
i want to get ext/oracle
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
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
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
on as experimental?
--
Ben Ramsey
http://benramsey.com/
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
ll do good to PHP opitimizer to implement
its work.
At last, this will protect PHP source scripts.
After all,what we need to do is just to define a good format of ZIC File.
ben
_
享用世界上最大的电子邮件系统― M
rate PHP into
TinyMUX via a SAPI module.
However, I can't find any documentation on SAPI, and most of the existing
SAPI modules are largely undocumented. Is there anybody who'd be willing to
chat with me off-list about my implementation? Or could anyone point me to
an API manual for SAPI
relevant and very easy to follow.
And it has code samples!
Sara, you're a lifesaver. Thank you!
--->Ben
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
PHP6 is about to make OPCode caching mechanism build into Zend Engine,
without question this will improve
PHP dramatically.But I have a radical thought: why not to directly run
ZIC(Zend Intermediate Code) files that have been compiled instead of
handling PHP source scripts. Just like a execrutab
t;It’d be nice if PDO::setAttribute() raised a warning
if you try to set PDO::ATTR_PERSISTENT, by the way."
I'm submitting the attached patch to do just that. :-)
--
Ben Ramsey
http://benramsey.com/
Index: ext/pdo/pdo_dbh.c
===
RCS fi
On 10/26/07 2:44 PM, Andi Gutmans wrote:
> Why is it not an if() statement?
It can be an if() statement. I added it as a switch in the expectation
that other attributes might be added to it in the future.
--
Ben Ramsey
http://benramsey.com/
--
PHP Internals - PHP Runtime Development Mail
ut backwards-compatibility
will make for a happy PHP community.
--->Ben
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
econd that emotion.
I'm aware that there's already been a lot of discussion on this already, but as
one who's already begun programming prototype code with namespaces, I agree with
Johannes and Sebastian here.
+1
--
Ben Ramsey
http://benramsey.com/
--
PHP Internals - PHP Runtime
regular
function declarations would be like:
Itest function testing($instance) {
return $instance;
}
Would this present a problem?
--
Ben Ramsey
http://benramsey.com/
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
stupid-ass reason to remove namespaces?
+1 for #3
--
Ben Ramsey
http://benramsey.com/
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
Ben Davies | Lead Developer | Stickyeyes
-Original Message-
From: Steph Fox [mailto:[EMAIL PROTECTED]
Sent: 06 November 2008 11:59
To: Ben Davies; 'Dan'; 'troels knak-nielsen'
Cc: 'Larry Garfield'; internals@lists.php.net
Subject: Re: [PHP-DEV] Call it: a
very fundamental issues with PHP, and
glib, childish responses like yours only serve to score points.
Grow up and join the conversation.
Ben Davies | Lead Developer | Stickyeyes
6th Floor,
West One,
Wellington Street,
Leeds, LS1 1BA
Email: [EMAIL PROTECTED]
0113 391 2929 | | Fax 0113 391 293
stack - which would have roughly half the
memory overhead of a doubly-linked list (half the number of pointers).
Do i just have no idea what i'm talking about or have i missed something
obvious?
Thanks in advance,
Ben
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscr
this, nor any really good
documentation on writing SAPIs. I don't think the Embed SAPI is going to
work for my purposes, but I'm willing to be convinced otherwise.
Just to be clear: I don't want to make PHP use Java objects; I want a Java
application to use PHP.
Thoughts? P
“spec
first” mentality, then what is the point of having a spec? It benefits us all
to think “spec first.”
-Ben
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
tations like HippyVM and HHVM say that they are compatible with Zend
PHP 5.x. Will we version the language specification separately, and individual
releases of various implementations (including the PHP Group implementation)
will state that they are compatible with version X of the specification?
-form-urlencoded for these requests.
I would venture to say that most people implementing PUT requests accept
application/json and most DELETE requests have no body at all. So, $_PUT and
$_DELETE superglobals wouldn’t make sense.
-Ben
--
PHP Internals - PHP Runtime Development Maili
asiest way to get the body of any HTTP request is to use the input stream:
$requestBody = file_get_contents('php://input');
I suppose we could make a super global that returns that for us, but it’s just
as easy to
use the above. Additionally, you might not want to put the full b
they are neither the request body nor the query string at that point. They
are arrays that represent them. I agree that $_GET and $_POST are left-overs
from a bygone day. Introducing aliases adds more confusion, IMHO.
-Ben
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, vi
data, and other things that are clumsy at the moment, such as request
> headers.
Agreed, and it seems that’s what PHP-FIG is working on for user land:
https://github.com/php-fig/fig-standards/blob/master/proposed/http-message.md
-Ben
--
PHP Internals - PHP Runtime Development Mailing Li
quest
and attempt to parse it in the way the developer expects it to be parsed. That’s
much better left up to the developer, extensions, and libraries.
Ben
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
m cool with $_QUERY and $_FORM. They make much more sense and don’t try to
use HTTP verbs, which can confuse the content and semantics of the data they
contain. Plus, they would just alias $_GET and $_POST, respectively, right?
-Ben
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
ibrary to
provide support for building RESTful web applications.
-Ben
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
d I’ll even volunteer to help make this happen
with a v2 that adheres to the PHP-FIG’s PSR-7 proposal.
-Ben
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
I've opened voting for the array_column() function RFC.
You can vote at https://wiki.php.net/rfc/array_column#voting
Regards,
Ben
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
On 1/12/13 9:14 AM, Peter Cowburn wrote:
The "Status" for this RFC is still "Under discussion" and on the RFC
listing page it is the same. Is not changing those two things simply
an oversight?
It was an oversight. I have corrected it in both places.
--
PHP Internals - PHP Runtime Development
escriptive, and they know what it means.
2) Developers coming from other languages (Ruby, JavaScript, etc.) will
instantly recognize array_pluck(). It's what they'll be looking for to
do the same thing, but they won't be looking for array_column().
-Ben
--
PHP Internals - P
can submit a new pull request against the master branch, if that's
acceptable. This is intended for 5.5.
-Ben
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
On 1/12/13 10:13 AM, Peter Cowburn wrote:
1. Why is this branch based on 5.3, rather than 5.4 or 5.5? Do you
want this to be part of 5.3? The RFC (in particular the vote question)
does not make it clear where/when you want this to be added.
I mentioned this in another response on this thread. I
On 1/11/13 6:17 PM, Ben Ramsey wrote:
I've opened voting for the array_column() function RFC.
You can vote at https://wiki.php.net/rfc/array_column#voting
I have updated the pull request by removing the array_pluck() alias. I
favor the array_column() alias, as it is more in keeping
On 1/14/13 11:54 AM, Scott MacVicar wrote:
On 14 Jan 2013, at 11:37, Ben Ramsey wrote:
On 1/11/13 6:17 PM, Ben Ramsey wrote:
I've opened voting for the array_column() function RFC.
You can vote at https://wiki.php.net/rfc/array_column#voting
I have updated the pull request by removin
#x27;m not going to call for a vote on the function name at this
time. The predominant sentiment on the list was for it to have one
function name or the other, but not both, so I've updated the pull
request accordingly.
-Ben
--
PHP Internals - PHP Runtime Development Mailing List
To uns
Sorry. I got sick for a few weeks, and this fell to the bottom of my
priorities list.
I'm not sure what the next steps are. This was approved by a majority vote.
What do I need to do now to get it into 5.5?
Thanks,
Ben
On Wed, Feb 27, 2013 at 6:51 AM, Pierre du Plessis
wrote:
>
> Please kill that alias. It is pointless to introduce a new function
> with an alias for it.
>
>
I killed the alias in this commit:
https://github.com/ramsey/php-src/commit/3439a098a0b646ff05d4da9748996214cac39d12
-Ben
ell. See
https://github.com/php/php-src/issues/257#issuecomment-12594630
Thanks,
Ben
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
load the non existant class, that internally, there would be
no attempt to access the non existant constant (since surely that comes
after the exception was thrown???) and we would get the Exception, rather
than a Fatal error.
Intended or a design error?
Ben Bidner
+61.7.3161.2000 (office
t and I would expect constant() to behave as the manual says it
does (and return NULL for non existent class constants instead of throwing
E_ERRORs).
Ben Bidner
+61.7.3161.2000 (office) | +61.7.3009.0651 (fax) | +61.4.3201.5362 (mobile)
http://www.vuetec.com/
--
PHP Internals -
Ilia Alshanetsky wrote:
Last week or so there was a fairly detailed discussion on the internals
list regarding type hinting based on my original patch. Since then the
patch has been revised to address the major concerns that were
identified (breakage of binary compatibility) as well extended wi
be great if a PHP arrays structure could be taken from memory,
written to a file or stream, and opened in Python as a Dictionary without
any database or serialization inbetween.
If this overlaps with any current development please let me know.
Thanks,
Ben DeMott
--
PHP Internals - PHP Runtim
Thanks for the response Derick,
So is the data structure thats being serialized remaining in some form
thats reflective of its binary encoding on the system.
Or is there some byte-encoding that goes on to generalize the binary structure?
I guess ... Does it find the values in memory of the distinc
Thu, Mar 18, 2010 at 1:22 PM, Derick Rethans wrote:
> On Thu, 18 Mar 2010, Ben DeMott wrote:
>
>> So is the data structure thats being serialized remaining in some form
>> thats reflective of its binary encoding on the system. Or is there
>> some byte-encoding that
I have been writing tests for the spl extension and would like to submit them.
Having asked in php.qa I have been advised to ask for an svn account.
I already have some tests in svn through the testfest svn repositories however
I am no longer able to commit via that particular route.
--
PHP In
On 15/06/10 10:28, Derick Rethans wrote:
> I've given you */tests karma, but please send the first few patches past
> php.qa before you commit them.
Done, and commited. Thanks for sorting this for me!
Ben
--
http://nocarrier.co.uk
twitter: @blongden
--
PHP Internals - PHP Runtime
I would be willing to play a part implementing it, too.
Cheers,
Ben.
=
Proposed extensions to traits
=
Background
==
Traits in PHP [1] enable improved code reuse. They can be simplistically
viewed as compiler-assisted copy-and-p
t actually creating properties, and you think they should actually
create properties?
Ben.
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
and/or trigger errors/warnings. So, which is it? Ignored or
not? Or is some aspect of them ignored and some aspect not?
I hope I'm not making things more confusing
Cheers,
Ben.
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
Hi, Stefan,
On 3/01/11 8:16 PM, Stefan Marr wrote:
On 03 Jan 2011, at 10:04, Ben Schmidt wrote:
In this email thread you seemed to be saying that properties defined in
traits are completely ignored, but in the RFC and svn it seems to be
saying that properties in traits are not ignored, but are
On 3/01/11 8:57 PM, Stefan Marr wrote:
Hi Ben:
On 03 Jan 2011, at 10:35, Ben Schmidt wrote:
OK. So this comment from your email is outdated?:
Yes, outdated since this email:
http://marc.info/?l=php-internals&m=129288735205036&w=2
Best regards
Stefan
OK, Stefan, I just got con
I think doing something like this is a good idea for classes and
interfaces.
Ben.
On 7/01/11 1:16 AM, Martin Scotta wrote:
Yes, my intention was to only add a magic constant with the class, similar
to this
namespace Bar {
class Foo {
const KLASS = __CLASS__;
}
}
namespace Buzz
to waste like that, and with something as controversial
as this, there's a real danger of that happening.
Cheers,
Ben.
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
in inheritance.
In this case, parent:: will always do what you expect then, and there's
no need for prev::.
Now to the other emails!
Ben.
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
Hi again, Stefan,
Continuing the conversation.
On 7/01/11 10:18 AM, Stefan Marr wrote:
On 02 Jan 2011, at 13:16, Ben Schmidt wrote:
Extension
- - - - -
I suggest these two problems can be simply solved by introducing two
additional uses of the trait keyword: as a scoping keyword and an
namespace, just let me know.
Thanks again and sorry for 'rejecting' most of your ideas, but thats
not final, I am still open for arguments.
No, by all means! The discussion is making the proposal better, and that
won't happen if you don't reject the bad ideas! Only if you rejected
something without good reason would there be any need to apologise. :-)
By breaking up the topics into subthreads, it hopefully makes it
easier for the community to comment on the different topics, too.
I think having it online shortly as an RFC might help too.
Thanks again,
Ben.
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
d'),func_get_args());
}
but much more elegant.
Of course should have been
public function addToQueue() {
return call_user_func(array($this->queue,'add'),func_get_args());
}
Ben.
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
7;re programming sloppily!). Mind you, it's pretty easy to write bad code
in any language
Ben.
On 19/01/11 9:36 AM, Hannes Landeholm wrote:
Hello,
I don't think a language becomes a "beginners language" just because many
new programmers use it. And it's still not a good
e recommended and taught people PHP as beginners without much
trouble. And Java.
At any rate, the important thing is that beginners shouldn't hold a good
language back, particularly if the innovations are not obligatory for
them to use.
Smiles,
Ben.
--
PHP Internals - PHP Runtime Develo
It does the whole of $b. It has to, because when you change 'baz', a reference in
'bar' needs to change to point to the newly copied 'baz', so 'bar' is
written...and likewise 'foo' is written.
Ben.
On 19/01/11 5:45 PM, Larry Garfield
x27;]=$b_bar; which would break the reference and make a
copy of just that part of the array. But this is a pretty nasty caller-callee
co-operative kind of thing. Just a thought to throw into the mix, though.
Disclaimer: I'm somewhat out of my depth here. But I'm sure someone will jump
that. For a
string, arguably the whole structure is overhead, since the string is
stored elsewhere via pointer. Likewise for objects. For a double, the
payload is 8 bytes, and stored in the zval, so there's less overhead. An
integer, with a payload of 4 bytes, is somewhere in between.
Ben.
I haven't looked in detail into the implementation, but I
know some documentation is available on the subject here:
http://www.php.net/manual/en/features.gc.php
Hope this helps!
Ben.
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
s is useful? Does it solve
some problem? Does it enable you to do things better than before?
Ben.
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
app than a help. A lower display precision is actually
desirable.
I agree that the information loss in e.g. PDO must be fixed, but it
seems more appropriate to fix those problems by forcing another
precision only in those cases.
A much better way to fix it.
Ben.
--
PHP Internals - PHP Runti
o do to be granted some?
Thanks,
Ben.
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
can continue to discuss it and agree to the extent that it's worth
starting an implementation.
Please read it and comment whenever you can find some time, guys!
Cheers,
Ben.
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
to make serialised data more readable, and less fragile (e.g.
if values are added to the enum, the mapping of strings to previous
constants does not change, no matter where the new value is added).
I see no reason to use floats or objects (or resources, or arrays, or
...).
Ben.
--
PHP Internal
be much like doing
$enum[]='FIRST';
$enum[]='SECOND';
$enum[]='THIRD';
$enum['last']='LAST';
in that 0, 1, 2 and 'last' are used.
There's a few more cents from me. :-)
Ben.
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
is any point in doing that.
To me, enumerations should be lightweight and efficient, closer to defining
constants than defining classes.
Ben.
Everybody agree that an enum is a set, in the mathematically point of view,
of names and values.
What we are discussing here is what should be those
the underlying values...
I agree with all you said.
Ben.
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
Can't remember whether I answered this clearly. I don't think type hinting is
worth the implementation overhead (loss of efficiency) it would require.
Ben.
On 23/02/11 1:11 AM, Jarrod Nettles wrote:
Apologies - I wasn't suggesting we implement extension methods. I was simp
need to be cloned, garbage collected,
anything. Comparisons are even cheaper than with strings, as they can just be
pointer comparisons. Type hinting just checks an attribute of the object and is
also very fast. Memory use is negligible.
Since it can be so efficient, I'm all for it.
Ben
attempts a cast
and only fails if 5 cannot be cast to the enum (I prefer this way). In
both cases, though, that would not be expected to be the usual way to
use the function: you would usually be expected to pass in a true enum
constant of the MyEnum type.
Ben.
--
PHP Internals - PHP Runtime Deve
lier today. I was against
type hinting until I realised that yes, it could work, and work
efficiently.
Ben.
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
On 13/02/11 9:15 PM, André Rømcke wrote:
On Thu, Feb 10, 2011 at 6:25 PM, Ben Schmidt
wrote:
On 11/02/11 3:37 AM, Philip Olson wrote:
You now have rights to the wiki rfc namespace.
Thanks a lot, Philip.
I have now made an RFC based on the most recent discussions:
http://wiki.php.net/rfc
, though, as essentially doing what André suggested 'in
reverse'--i.e. a 'non-final' marker.
Ben.
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
onfusion is avoided.
Having thought about it a bit further now, though, the reflection API is
arguably a bit useless in this case. Perhaps to mitigate this, a new
method could be added to ReflectionMethod to find details of the target
of a forwarding method for a particular object (at the particular time
the method is invoked).
Ben.
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
...
}
...
}
function print_element(Element $e) {
echo Element::weight($e), PHP_EOL,
Element::density($e), PHP_EOL,
Element::protons($e), PHP_EOL,
Element::neutrons($e);
}
print_element(Element::Hydrogen);
print_element(Element::Argon);
print_element(Element::Iron);
Ben.
--
ed.
So I think all your recommendations are good, as long as.
- We take care to implement it efficiently, so enum comparisons etc. are
pointer comparisons, not string or other comparisons.
- We are careful to restrict enum member functions appropriately so
enums don't turn into full-blown
more convenient.
Ben.
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
acceptable value, execution can continue. If not, error, same as if
something of a non-scalar non-matching type is passed, consistent with
object type hints.
Ben.
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
1 - 100 of 503 matches
Mail list logo