> On the other hand you have a working solution.
> You won't be able to use annotations for PHP5 projects anyway.
> Except, if we put them into comments or doc-comments.
>
> /**[Attribute(Value)]*/
Why not /**@ Attribute Value */ or /**@ Attribute(Value) */? No []
required and @ looks more famili
Am 06.02.2015 um 21:22 schrieb Nikita Popov:
> After much initial reluctance, I've voted in favor of this RFC.
Thank you Nikita for this decision. I would really like to have any kind
of scalar type hints introduced into PHP. I think most want this, but do
not agree if and how type conversion shou
s also a valid callable.
Greets
Dennis Birkholz
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
Hi,
Am 16.02.2015 um 12:07 schrieb Dmitry Stogov:
> HHVM already implemented similar concept
>
> http://docs.hhvm.com/manual/en/hack.attributes.php
Why not borrow their syntax? Makes it easier to write stuff for both
languages.
Greets,
Dennis
--
PHP Internals - PHP Runtime Development Mailing
Am 16.02.2015 um 21:39 schrieb François Laupretre:
> If we deprecate using bare class names as type hints and replace it with the
> 'object(classname)' syntax, we can reserve keywords for 7.0 and, maybe 7.1
> but potential name clashes should be away in 7.2.
This is a huge BC break and will alw
Am 17.02.2015 um 12:30 schrieb Leigh:
> And you find taking authority over a library away from the library
> author completely acceptable?
>
> If I write an API that works perfectly well in strict mode, why
> shouldn't I be able to turn strict on for my whole library? Do I just
> tell users that n
Am 18.02.2015 um 21:44 schrieb Anthony Ferrara:
> Since the resignation of Andrea, the mixed-mode type hint (called
> declaration in the proposal) proposal has been left abandoned.
> Considering that the ending votes were 67/34 (66.3%) with several
> no-votes being only due to reasonably minor issu
Am 19.02.2015 um 05:21 schrieb Dennis Birkholz:
> Am 18.02.2015 um 21:44 schrieb Anthony Ferrara:
>> Since the resignation of Andrea, the mixed-mode type hint (called
>> declaration in the proposal) proposal has been left abandoned.
>> Considering that the ending votes we
Hello Anthony,
Am 19.02.2015 um 14:01 schrieb Anthony Ferrara:
> I believe that RFCs should be opinionated. I dislike the recent trend
> around having a lot of voting options as it only complicates things
> for the voter.
I just thought giving a vote on how to enable strict mode would enable a
fe
Hi Adam,
Am 19.02.2015 um 22:40 schrieb Adam Harvey:
> RFC: https://wiki.php.net/rfc/comparable
> PR: https://github.com/php/php-src/pull/1097
I see a little problem here by allowing any comparison. Comparing is
used for ordering, but you can easily construct ordering mechanisms that
simply don't
Am 20.02.2015 um 19:51 schrieb Markus Fischer:
> From the RFC:
>
> “resource”
> “object”
> “scalar”
> “mixed”
> “numeric”
>
> "... prohibits their usage as class, interface and trait names."
>
> This is such a major BC break.
I just wonder why we need to prohibit these names
Hello
Am 20.02.2015 um 22:03 schrieb François Laupretre:
>> I just wonder why we need to prohibit these names. Can types not reside
>> in the global \ namespace? We could then change the class resolution
>> rules to allow to look also in \ as is done for functions currently.
>>
>> Thanks
>> Dennis
Hi François,
Am 21.02.2015 um 03:03 schrieb François Laupretre:
> I didn't consider defining builtin type hints as classes because :
I was not proposing using internal types as classes. I just want to
define a clean behavior for all kinds of types that may exist some time
in PHP. As no scalar typ
Hi François,
> Please give more precise examples. I'm afraid I don't understand :
I try to clarify.
> If you use \ as prefix for builtin types, how do you distinguish this from
> classes ? Would \resource mean the builtin type or a class name ?
Currently, all traits, classes and interfaces sha
Hi,
Am 23.02.2015 um 19:15 schrieb Nikita Popov:
> A second vote will decide whether to use a BaseException based inheritance
> hierarchy. This vote uses a simple majority.
I like this RFC and hope it passes. I am a little concerned about
littering the global namespace. It would be preferable to
Hi Phil,
Am 24.02.2015 um 14:52 schrieb Philip Sturgeon:
> https://wiki.php.net/rfc/anonymous_classes
I like the idea of having anonymous classes, it is very helpful during
development to just try something out without having the burden of
creating a new file and a complete class including namesp
Hi all,
Am 25.02.2015 um 10:09 schrieb Zeev Suraski:
> I think that what Anthony proposed about a week or so ago, of having both
> votes, and if both pass 2/3 - have another vote to choose between them
> (where a simple majority wins) - makes the most sense in this uncharted
> territory.
but that
Hi Lester,
Am 25.02.2015 um 12:48 schrieb Lester Caine:
> On 25/02/15 11:23, Dennis Birkholz wrote:
>> Or you could create a three-way vote, both proposals together need 2/3
>> majority over no-votes and the proposals that gets more than the other
>> is chosen.
>
>
Hi Trevor,
I had no look to the code as I am no C or internals guru.
I just wanted to add that I would prefer a generic
DateTimeInterface::createFromInstance(DateTimeInterface $copyFrom)
method, so you do not need to distinguish between DateTime and
DateTimeImmutable when creating a new instance.
Hi together,
Am 14.03.2015 um 14:37 schrieb Peter van Fessem:
>> If a dev turns a file that he or she wrote into strict mode, then that
>> only counts for that specific file. If you take over some code, then you
>> can remove the declare line. *none* of those things you'd be able to do
>> with ini
Hi all,
Am 15.03.2015 um 15:19 schrieb Anthony Ferrara:
> ... There were a number of voters that I didn't recognize.
I wondered about who the people are that vote and how they "earned" the
right to do so. I think this kind of confusion could be avoided if
people.php.net would contain a little mor
Hi Anthony,
Am 15.03.2015 um 22:33 schrieb Anthony Ferrara:
> Therefore, I am closing votes on this RFC effective tomorrow, March 16th.
could you announce the (UTC) time you close the vote? That is something
most votes miss here...
Greets
Dennis
--
PHP Internals - PHP Runtime Development Maili
Hello Pierre,
Am 16.03.2015 um 02:34 schrieb Pierre Joye:
> "Some of the strict standards notices are converted to an error
> category that is considered more severe. As such error handlers might
> treat it more severely, resulting in BC breakage."
>
> Does it mean that some errors may end on rec
Hi all,
Am 16.03.2015 um 03:16 schrieb Yasuo Ohgaki:
> This code is an example that I posted in other thread.
>
> e.g.
> function check_num_range(int $num) { if ($num < 0 || $num > 100)
> trigger_error('Invalid range'); }
> // Somewhere far from function definition.
> $num = $GET['num'];
> // So
Hello Xinchen,
Am 16.03.2015 um 06:28 schrieb Xinchen Hui:
> lib.php
> declare(strict_types = 1);
>function add(int $a, int $b) {
>}
>
> add($_GET['a'], $_GET['b']);
>
> that means, I need to add a lots of (int) while I try to call a
> function
Hi Yasuo,
Am 16.03.2015 um 07:22 schrieb Yasuo Ohgaki:
> Caller _must_ satisfy callee requirements. This is simple principle to
> write a secure code.
>
> With this RFC, caller overrides security related setting. This means
> scripts
> that are prepared for type safety is "ignored" and it leads s
Hi all,
Am 16.03.2015 um 19:01 schrieb Philip Sturgeon:
> I mentioned on that other thread that the FIG has a rule saying you
> cannot cast a vote in any vote that was initiated before your
> membership was activated.
> Let's just shove that rule in the wiki and call it done.
when we are fixing t
Hi Thomas,
Am 16.03.2015 um 15:33 schrieb Thomas Punt:
> A library can easily expose a facade that enforces a user of that library
> (who is in weak mode) to have to write in strict mode [1]. Once more,
> this can be done unintentionally [2] because of the
> caller-deciding semantics. These exampl
Hi,
Am 19.03.2015 um 17:27 schrieb Sebastian B.-Hagensen:
> Another way to unify array and string callback may be to use the
> callable syntax and have it return a closure:
> callable('strlen');
> callable($object, $methodName);
> callable('class', 'staticMethod')
but before that happens, we shou
Hi,
Am 19.03.2015 um 20:26 schrieb Levi Morrison:
> On Thu, Mar 19, 2015 at 1:05 PM, Dennis Birkholz wrote:
>> Hi,
>>
>> Am 19.03.2015 um 17:27 schrieb Sebastian B.-Hagensen:
>>> Another way to unify array and string callback may be to use the
>>> calla
Am 19.03.2015 um 22:11 schrieb Levi Morrison:
> On Thu, Mar 19, 2015 at 1:44 PM, Dennis Birkholz wrote:
>> Hi,
>>
>> Am 19.03.2015 um 20:26 schrieb Levi Morrison:
>>> On Thu, Mar 19, 2015 at 1:05 PM, Dennis Birkholz
>>> wrote:
>>>> Hi,
&
Hi,
Am 23.03.2015 um 06:21 schrieb Stanislav Malyshev:
> Looking into some issue, I've discovered that, to my surprise,
> Exceptions are serializable. Except that it doesn't always work of
> course (e.g. see http://stackoverflow.com/q/9747813/214196) because
> exceptions contain backtraces, and th
Am 31.03.2015 um 19:09 schrieb Grégory Planchat:
> Possible solutions would be :
> 1. About multiplexing :
> 1.a. integrate php-uv in the core in its current form and let
> developers implement their own protocol layer
> 1.b. transform some project like ReactPHP into an extension (using
> Zephi
Hello,
Am 30.03.2015 um 12:04 schrieb Ferenc Kovacs:
> I know that our official release process allows that, but there are some
> reasonable arguments against doing that and this topic was brought up
> multiple times related to specific fixes.
> I have two open PRs like that:
> https://github.com/
Hi Stas,
Am 01.04.2015 um 21:19 schrieb Stanislav Malyshev:
> Hi!
>
>> I am sorry for the contributor but my example is
>> https://github.com/php/php-src/pull/1145
>> (DateTime::createFromImmutable() method) which was posted here on the
>> list, got three negative replies but was merged neverthel
Hi,
Am 01.04.2015 um 21:43 schrieb Stanislav Malyshev:
>> That is right and I think that is the reality we have to face: most
>> users use distro versions. They get a new version when they need to
>> upgrade their distro every few years.
>
> I'm not sure where you got this statistics from, but as
Hi Trevor,
Am 01.04.2015 um 22:19 schrieb Trevor Suarez:
> Author of PR https://github.com/php/php-src/pull/1145 here.
>
> I'm really quite sorry. I didn't mean to create a mess here. I was just
> trying to contribute. :/
I am sorry I caused this mess by using your PR (or better: the
acceptance
Hi,
Am 01.04.2015 um 22:36 schrieb Stanislav Malyshev:
>> Debian, Ubuntu and CentOS: ~21,23%
>>
>> (I assume here like Anthony that the installs matching a distribution
>> specific version always come from that distribution).
>
> Pretty big one, I'd say, but even with this one you only get 1/5. A
Hi François,
Am 28.04.2015 um 13:32 schrieb François Laupretre:
> - In 7.0, introduce the 'object' (accepts any object instance) and
> 'object(ClassName)' (similar to the bare 'ClassName') type hint syntaxes.
I find this variant extremely nonintuitive and it conflicts with the
behavior of every
Hi all,
Am 28.04.2015 um 15:24 schrieb Olivier Garcia:
> The "Improved Error Callback Mechanism" RFC is now in voting phase.
just to satisfy my personal curiosity: how can this RFC target 7.0 which
had the feature freeze over a month ago? Should it not be 7.1 just to
treat all contributors equal?
Hi Yasuo,
Am 30.04.2015 um 07:26 schrieb Yasuo Ohgaki:
> "int" Cast is bad. Incorrect "int" type hint worse as it could trigger DoS.
could you please stop arguing with "Denial of Service" for this
behavior? Using a security related term that has nothing to do with the
actual problem is irritating
Hi,
Am 23.07.2015 um 11:54 schrieb Josh Di Fabio:
> Now, most often, dirname(... dirname(__DIR__) ...) is used in application
> entry
> points during the bootstrapping process. In my experience, it's most commonly
> used in order to include an autoloader or some bootstrap file which itself is
> r
Hi,
Am 25.07.2015 um 19:42 schrieb Scott Arciszewski:
> On Sat, Jul 25, 2015 at 10:11 AM, Dennis Birkholz wrote:
>> Hi,
>>
>> Am 23.07.2015 um 11:54 schrieb Josh Di Fabio:
>>> Now, most often, dirname(... dirname(__DIR__) ...) is used in application
>>> en
Hi Anthony,
Am 04.08.2015 um 15:25 schrieb Anthony Ferrara:
> Lauri,
>
> On Tue, Aug 4, 2015 at 9:12 AM, Lauri Kenttä wrote:
>> On 2015-08-04 14:54, Scott Arciszewski wrote:
>>>
>>> we do not allow secure modes
>>
>> I hope that was a typo... ;)
>
> Indeed, it was not.
>
> If you want to build
Hi Matt,
Am 06.08.2015 um 05:46 schrieb Matt Tait:
> With regards to the fact that not all SQL queries are directly
> parameterizable, this is true. Structural parts of a query, such as table
> names, column names and complex conditions are hard to parameterize with
> "vanilla" prepared statements
Hi all,
Am 21.08.2015 um 14:51 schrieb Christoph Becker:
> Hi Bob!
>
> On 21.08.2015 at 00:13, Bob Weinand wrote:
>
>> Commit:82b73fd1e3c53228bb31b75a446114b5fd0cd240
>> Author:Bob Weinand Sun, 2 Nov 2014
>> 23:25:49 +0100
>> Parents: a3eed5fbfe24368726906f425b15ce40b5fc36e0
int my pure PHP function? Or are both wrong? I feel there
should be a separate RFC that addresses a unification of implicit
conversion rules and that matter should not be in the type hinting
discussion.
Thanks for listening,
Dennis Birkholz
--
PHP Internals - PHP Runtime Development Mailing List
for-in operation that iterates
over object properties is the lack of non-integer keys in Javascript arrays.
For PHP iterating over object properties is a very rare case IMHO. So I
would stick with foreach for that case.
Kind regards,
Dennis Birkholz
--
PHP Internals - PHP Runtime Developmen
Hi Ben,
Am 31.08.2015 um 22:31 schrieb Ben Scholzen 'DASPRiD':
> I've written up an RFC for supporting generic classes and methods in
> PHP, and I'd love to hear your thoughts about it.
>
> https://wiki.php.net/rfc/generics
I have some points where I think some clarification is required before
s
Hi together,
1. If we require some keyword instead of the colon to limit which types
the type placeholders can have I would choose:
class Foo {}
The C#-like syntax "where T1 extends Bla implements Blubb" (proposed in
another thread) has two downsides:
a) It will not fit nicely with generic method
Am 12.09.2015 um 12:03 schrieb Dennis Birkholz:
> Hi together,
>
> 1. If we require some keyword instead of the colon to limit which types
> the type placeholders can have I would choose:
> class Foo {}
Just to save you some lookups in the Hack documentation:
1. Hack uses the &quo
Hi all,
Am 15.09.2015 um 17:09 schrieb Craig Francis:
> 2015-09-14 4:44 GMT+02:00 Christopher Owen :
>> Please consider making ‘taint’ a first-class feature/extension in PHP 7.0.
>
> I would echo Kalle's suggestion of 7.1.
>
> But I think you will find it hard to get support... I was pushing thi
Hi together,
for some time now I have a pull request open
(https://github.com/php/php-src/pull/1457) where I want to introduce the
two constants SIGRTMIN and SIGRTMAX and allow pcntl_signal() to register
handlers for "real-time signals" (from SIGRTMIN to SIGRTMAX).
>From the signal manpage:
> Unl
Hi all,
Am 31.12.2015 um 15:52 schrieb Junade Ali:
> I am looking to submit an RFC in order to remove the error suppression
> operator in PHP, namely the @ symbol.
before you can deprecate the @ operator, there is a lot of work to do
beforehand. A lot of functions print warnings when they fail (i
Am 10.01.2016 um 11:20 schrieb Lester Caine:
> The debate on Anonymous voting has been voted on already?
>
> From my own point of view, I like to know who supports and who opposes a
> particular RFC simply because I can't vote myself. It helps me to decide
> if I need to look deeper into the RFC o
Hi Eli,
Am 11.01.2016 um 15:45 schrieb Eli:
On 1/10/16 8:15 AM, Dennis Birkholz wrote:
I would really like to understand the rational behind anonymous voting
in the PHP internals context. Votes for RFCs should be purely based on
technical reasons and whether the language change would benefit
Hi all,
Am 16.03.2016 um 21:29 schrieb Fleshgrinder:
> Another more complicated user case would be *mysqli_fetch_object* that
> populates the properties with values from a storage but values that
> should become something specific and strict at some point but are
> initially populated as strings.
Hi all,
Am 20.04.2016 um 16:44 schrieb guilhermebla...@gmail.com:
> If I want to hire/move a person to a department that is registered in the
> system, but is not a 3rd party company person, how would you achieve that
> considering the following class structure?
>
> class Person {}
> class Employ
Hi Robert,
Am 23.11.23 um 21:31 schrieb Robert Landers:
However, we can make certain methods private anyway, namely,
constructors (I haven't gone hunting for other built-in methods yet).
This is perfectly allowed:
class P {
public function __construct($name = 'waldo') {
echo "hell
Hi Nikita,
Am 04.12.19 um 19:50 schrieb Nikita Popov:
>> This RFC proposes to add a native WeakMap type for PHP 8:
>> https://wiki.php.net/rfc/weak_maps
>
> Any comments on this proposal? Otherwise this could head to voting...
thanks for this proposal, will be really helpful!
The only caveat for
Hi Nikita,
On 06.12.19 11:29, Nikita Popov wrote:
Could you provide some context on why you think serialization support for
WeakMap is important? As weak maps are essentially caching structures,
serializing them doesn't seem particularly useful in the first place, but
when combined with the quit
On 12.12.19 18:13, Nikita Popov wrote:
On Tue, Dec 10, 2019 at 12:03 PM Dennis Birkholz
wrote:
But my just want to repeat my main concern: buildin
data structures that are not serializable are a real problem for users
that use serialization extensively. Maybe the solution to that problem
is a
On 16.12.19 10:27, Nikita Popov wrote:
On Mon, Dec 16, 2019 at 10:19 AM Dennis Birkholz
wrote:
On 12.12.19 18:13, Nikita Popov wrote:
On Tue, Dec 10, 2019 at 12:03 PM Dennis Birkholz <
p...@dennis.birkholz.biz>
wrote:
But my just want to repeat my main concern: buildin
data stru
Hello together,
Am 25.03.20 um 16:46 schrieb Larry Garfield:
> On Wed, Mar 25, 2020, at 10:29 AM, Ilija Tovilo wrote:
>> Thanks for your feedback, Larry!
>>
>>> One possible improvement to either version is allowing an expression on the
>>> left side. That is, rather than doing an equality match
Am 25.03.20 um 15:24 schrieb Larry Garfield:
> On Wed, Mar 25, 2020, at 5:57 AM, Nicolas Grekas wrote:
>> Máté suggested this syntax and it has my preference over the one you menton
>> Larry: doubling the visibility keyword could be enough to express
>> read+write access:
>>
>> public private $prop
Hello David,
isn't fflush exactly this:
https://www.php.net/manual/en/function.fflush.php
Greets
Dennis
Am 01.06.20 um 18:56 schrieb David Gebler:
> Exactly as the subject says, I would like to propose an RFC for adding an
> fsync() function for file resources, which would in essence be a thin
>
Hi,
Am 04.08.20 um 15:45 schrieb Derick Rethans:
> Patches and comments welcome.
if the syntax will be changed to having a closing delimiter, I would
really like to have symmetrical delimiters, like @{ }@ or something like
that. ] as a closing delimiter just seems to collide with the array
syntax
Am 08.12.20 um 18:40 schrieb Larry Garfield:
> For serialization, we'll introduce a new serialization marker, enum, which
> will make it feasible too round-trip an enum while maintaining
> singleton-ness. More specifically, the deserialize routine would essentially
> become $type::from($value),
Hello,
I was also able to reproduce the error.
I used the latest available "daily" cloud image for Debian Buster and
created a small recipe to reproduce. Hopefully this helps in finding the
problem.
Greets
Dennis
wget
"https://cloud.debian.org/images/cloud/buster/20210208-542/debian-10-nocloud
Hi together,
Am 06.06.2017 um 14:43 schrieb Nikita Popov:
> First of all: I think the ability to implement parts of PHP extensions in
> PHP is extremely important and will be a game changer in our ability to
> maintain and improve our standard library.
I agree with you here 100%.
> 1. As far as
Hello Benjamin,
Am 27.10.2017 um 14:12 schrieb Benjamin Coutu:
> Hello everyone,
>
> Please consider these two statements:
>
> substr($string, 0, $length);
> array_slice($array, 0, $length, true);
>
> Currently, with substr(), if $offset is zero and $length is smaller or equal
> to the origina
Hello together,
today I noticed that the order in which stream_flush/stream_close and
the destructor of a (userspace implemented) stream wrapper are called is
weird:
When a stream is closed with fclose(), the call order is as expected:
stream_flush, stream_close, finally the destructor.
But if th
Hello again,
Am 20.03.2018 um 23:13 schrieb Dennis Birkholz:
> (I also appended both example files as I don't know how long snippets at
> 3v4l.org persist)
the list does not allow attachments, so inline. If this does not work,
3v4l must suffice.
Greets,
Dennis
id = sel
Hello,
Am 22.03.2018 um 06:59 schrieb CHU Zhaowei:
> There is a related bug report: https://bugs.php.net/bug.php?id=75931
Thank you for pointing out this bug report. It is about stream filters
(extending the php_user_filter class) and not about stream wrappers
which seem to have similar issues.
Hi Joe,
On 02.02.19 09:35, Joe Watkins wrote:
Some time ago I brought this up for discussion, and last night was reminded
of it's existence, and so this morning rebased and reworked the patch a
little based on the feedback I got back then.
Since it was long ago, and there's no particular rush,
Hi Nikita,
On 05.02.19 16:50, Nikita Popov wrote:
Serialization for weak refs is a bit tricky, and I feel like supporting
it could easily become a foot-gun. The fundamental problem is that for
serialization to produce a meaningful value, the object referenced by a
WeakReference must also be pa
76 matches
Mail list logo