[PHP-DEV] rounding integers

2023-05-20 Thread Marc
the given type and proper handle integers as well: > round — Rounds a number /** @template T of int|float */ round(T $num, int $precision = 0, int $mode = PHP_ROUND_HALF_UP): T Do you think this could be an acceptable BC-break or should this be a different function? Thanks, Marc

Re: [PHP-DEV] [RFC] [VOTE] Define proper semantics for range() function

2023-06-07 Thread Marc
value of the step. range(1, 5, 2.0) // list range(1, 5, 2.1) // list In my opinion, no matter, if start, end or step is a float the result should be a list. Thanks, Marc -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php

Re: [PHP-DEV] [RFC] [VOTE] Define proper semantics for range() function

2023-06-08 Thread Marc
On 08.06.23 13:16, G. P. B. wrote: On Thu, 8 Jun 2023 at 07:35, Marc wrote: sorry for speaking up so late but I think the following change is a mistake and unexpected: > Calls to range() that have integer boundaries but a float step that is compatible as an integer will now return

Re: [PHP-DEV] rounding integers

2023-06-28 Thread Marc
after rounding. Thanks, Marc [1] https://github.com/php/php-src/compare/master...marc-mabe:php-src:integer_rounding

Re: [PHP-DEV] Base_convert changes

2023-06-30 Thread Marc
Hi, I noticed a deprecation of passing invalid characters to bindec since PHP 7.4 which is still deprecated and does not result in an error. Haven't checked the other affected functions of this RFC. https://3v4l.org/Bqj5B Is anyone taking care to remove this in 9.0? Thanks, Marc -

[PHP-DEV] number_format integer + overflow

2023-07-09 Thread Marc
Hi internals, As commented in thread of "rounding integers" [1], I have opened a PR [2] for fully supporting formatting integers using "number_format" without any precision loss. Additionally, on working on it, I noticed a possible integer overflow on |$decimals |argument of the current func

Re: [PHP-DEV] Re: Default values for php.ini environment variables

2023-07-13 Thread Marc
ether? Anyway even without ":+" or chaining it would be a very good addition :+1: Thanks, Marc -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php

[PHP-DEV] Wiki account for RFC

2023-09-23 Thread Marc
ndpwd Please could you help me what I have to do to back login. Thanks, Marc -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php

Re: [PHP-DEV] [RFC] [Discussion] Rounding Integers as int

2023-10-03 Thread Marc
Hi, On 26.09.23 12:39, Marc Bennewitz wrote: I'd like to put a new RFC under discussion: https://wiki.php.net/rfc/integer-rounding I tried to make the RFC text a bit more clear. As I'm not a native English speaker I would be very welcome for wording suggestions and/or gra

Re: [PHP-DEV] [RFC] [Discussion] Adding bcround, bcfloor and bcceil to BCMath

2023-10-03 Thread Marc
om 2013 : https://wiki.php.net/rfc/gmp_number (never put to vote). Also I think to remember about a proposal to have GMP natively supported for numbers in PHP but I can't find it anymore. Kind regards, Jorg Best, Marc

Re: [PHP-DEV] DOMXPath / XSLTProcessor function callbacks

2023-10-15 Thread Marc
gister all functions? Also what would happen in this case with functions included later? Would they also be callable or only the functions known at the point of registering? Best regards Tim Düsterhus Cheers Niels Best, Marc

Re: [PHP-DEV] Basic Type Alias

2023-10-26 Thread Marc
id(mixed $var): bool $refl = ReflectionClass(UserId::class); $refl = ReflectionType::from(UserId::class); ... Best, Marc -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: https://www.php.net/unsub.php

[PHP-DEV] New DateTime[Immutable]::createFromTimestamp

2023-10-28 Thread Marc
):DateTime date_create_immutable_from_timestamp(int|float$timestamp):DateTimeImmutable I hope this does not require an RFC, but I'm not sure so I'm writing here to get some thoughts. Thanks, Marc

Re: [PHP-DEV] New DateTime[Immutable]::createFromTimestamp

2023-10-28 Thread Marc
On 28.10.23 17:33, Rowan Tommins wrote: On 28 October 2023 15:40:29 BST, Saki Takamachi wrote: Hi Marc, Personally, I don't think these are necessarily necessary since there is a "from format". As noted on the PR, both the default constructor and createFromFormat require

Re: [PHP-DEV] New DateTime[Immutable]::createFromTimestamp

2023-10-29 Thread Marc
Hi Saki, On 28.10.23 18:32, Saki Takamachi wrote: Hi Marc, On a 64bit system it's obvious to have higher precision if you handle the integer and fractions part separately (as timelib does) but this doesn't help if you already have a floating point number at hand. Also JS use

Re: [PHP-DEV] New DateTime[Immutable]::createFromTimestamp

2023-10-29 Thread Marc
On 29.10.23 19:41, Marc wrote: Hi Saki, On 28.10.23 18:32, Saki Takamachi wrote: Hi Marc, On a 64bit system it's obvious to have higher precision if you handle the integer and fractions part separately (as timelib does) but this doesn't help if you already have a floating point

Re: [PHP-DEV] [RFC] [Discussion] Rounding Integers as int

2024-03-08 Thread Marc
0 via new parameter "force_float". Also the deprecation has been removed as nobody liked it. If no further comments arrive I'll like to start voting next week Friday. Best regards, Marc On 25.02.24 18:09, Marc Bennewitz wrote: Hi all, I now have updated the RFC to allow to opt-i

[PHP-DEV] Idea: Implicit inheriting function argument & return type-hint

2024-03-08 Thread Marc
} That do you think? This is just something that come to mind without having the knowledge nor time for this kind of RFC or implementation. Greetings, Marc

Re: [PHP-DEV] Re: [RFC] New custom object serialization mechanism

2019-03-03 Thread Marc
a solution for this as I have a library which would benefit from it: (https://github.com/marc-mabe/php-enum/blob/v3.1.1/src/EnumSerializableTrait.php#L46-L72) Would it be possible to instead get the new instance as argument and expect the instance to be returned but on the same time allow to

Re: [PHP-DEV] Re: [RFC] New custom object serialization mechanism

2019-03-04 Thread Marc
On 04.03.19 10:08, Nikita Popov wrote: On Mon, Mar 4, 2019 at 6:31 AM Marc wrote: (sorry for top posting) Hi Nikita, as for the question about magic methods vs. interface. I have the feeling that it could be done with both in a clean way to make both parties happy. 1. Having

Re: [PHP-DEV] [RFC] Strict operators directive

2019-07-10 Thread Marc
use these for bitsets. But I have a note here that bit shifting currently does not work with binary strings (tries to cast binary string to integer) and even if it would shift the binary string the >> is designed to keep the first bit as a positive/negative flag which of course does

[PHP-DEV] Bug Wrong resolution of "Late Static Binding" after self::method()

2020-03-08 Thread Marc
me why the result of "self::method()" is different then "$self = self::class; $self::method();". Thanks, Marc -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Bug Wrong resolution of "Late Static Binding" after self::method()

2020-03-08 Thread Marc
uot;static" reference? Sorry for all these questions. Sometimes the world could be so simple until it turns out it isn't for no reason. Thanks, Marc -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Bug Wrong resolution of "Late Static Binding" after self::method()

2020-03-09 Thread Marc
Thank you all for explaining. This helps a lot! Marc On 09.03.20 10:27, Rowan Tommins wrote: On Mon, 9 Mar 2020 at 05:38, Marc wrote: Does it make sense? -> I have read "self::" all time as a shortcut for "MyClass::" until I noticed this is not the case and I exp

Re: [PHP-DEV] Analysis of property visibility, immutability, and cloning proposals

2020-12-29 Thread Marc
On 28.12.20 21:23, Larry Garfield wrote: > There's been a number of discussions of late around property visibility and > how to make objects more immutable. Since it seems to have been > well-received in the past, I decided to do a complete analysis and context of > the various things that ha

Re: [PHP-DEV] [RFC] Enumerations, Round 2

2020-12-29 Thread Marc
On 28.12.20 21:21, Larry Garfield wrote: > Hello, Internalians! > > After considerable discussion and effort, Ilija and I are ready to offer you > round 2 on enumerations. This is in the spirit of the previous discussion, > but based on that discussion a great deal has been reworked. The main

Re: [PHP-DEV] Re: Improving PRNG implementation.

2020-12-29 Thread Marc
Hi zeriyoshi, On 23.12.20 14:41, zeriyoshi wrote: > Thanks tyson. > >> This would also make it easier to use those generators in brand new > algorithms that weren't in the initial RFC. >> (or in algorithms written by users in PHP) > This suggestion seems to make sense. Maybe the RNG should only fo

Re: [PHP-DEV] Re: Improving PRNG implementation.

2021-01-03 Thread Marc
On 01.01.21 20:22, Go Kudo wrote: > Hi Marc, and sorry for the late reply. Email has been marked as spam... > >> I would expect the Random number generator to implement from Iterator > using an integer for current() value >> and providing utility functions (simple functions

Re: [PHP-DEV] [RFC] Enumerations, Round 2

2021-01-03 Thread Marc
On 29.12.20 16:42, Larry Garfield wrote: > On Tue, Dec 29, 2020, at 2:48 AM, Marc wrote: >> On 28.12.20 21:21, Larry Garfield wrote: >>> Hello, Internalians! >>> >>> After considerable discussion and effort, Ilija and I are ready to offer >>> you ro

Re: [PHP-DEV] [RFC] Enumerations, Round 2

2021-01-03 Thread Marc
On 03.01.21 11:56, Marc wrote: > On 29.12.20 16:42, Larry Garfield wrote: >> On Tue, Dec 29, 2020, at 2:48 AM, Marc wrote: >>> On 28.12.20 21:21, Larry Garfield wrote: >>>> Hello, Internalians! >>>> >>>> After considerable discussion and effor

Re: [PHP-DEV] [RFC] Enumerations, Round 2

2021-01-03 Thread Marc
Hi Ilija, On 03.01.21 12:54, Ilija Tovilo wrote: Hi Marc I don't have a really good use-case for float values. It just seems weird to me that a ScalarEnum doesn't support all scalars. Using the enum value as array key for `cases()` works with your current proposal but if we lat

[PHP-DEV] Inconsistency in enumerations RFC

2021-03-14 Thread Marc
ching the string representation instead of TypeError as it matches the defined argument types. Thoughts? Thanks, Marc

Re: [PHP-DEV] Built-in decorator attribute?

2021-03-14 Thread Marc
s, Wordpress and so on) makes this a potential future with wide adoption. If you'd get 2/3 votes for it is another topic. I can fully agree here - this would be very useful and I also thought in trying out something similar to wrap expensive functions by a cache but I don't have e

Re: [PHP-DEV] Inconsistency in enumerations RFC

2021-03-15 Thread Marc
Hi Ilija - thanks for your answers On 14.03.21 23:18, Ilija Tovilo wrote: Hi Marc Thanks for testing the enum feature. Hi I'm trying out the new enumeration support for PHP 8.1 using https://github.com/php/php-src/pull/6489 thought to implement a polyfill based on class constant

Re: [PHP-DEV] Inconsistency in enumerations RFC

2021-03-17 Thread Marc
On 17.03.21 09:36, Ilija Tovilo wrote: Hi Marc I think it would be much clearer if there would be two different interfaces like: ``` interface IntEnum extends UnitEnum { public int $value; public static function from(int$value): static; public static function tryFrom(int$value): ?static

[PHP-DEV] readonly properties

2021-08-12 Thread Marc
2; var_dump($interval->days);  // 0 3. Exception properties Exception properties are protected but does it really make sense to be able to modify an exception property after initialization? I know this would be a BC break :( Thanks for all the excellent work - Can't wait for 8.1

Re: [PHP-DEV] readonly properties

2021-08-13 Thread Marc
On 8/13/21 4:56 PM, Nikita Popov wrote: On Thu, Aug 12, 2021 at 9:16 PM Marc wrote: Hi, As 8.1 adds readonly properties I wonder which build-in properties should be defined readonly. Currently I could find build-in readonly properties only on PDO and DOM. Very incomplete list where

Re: [PHP-DEV] [RFC] Random Extension 3.0

2021-09-04 Thread Marc
ry to me to pass min/max arguments if you are just interested in a random integer or passing max as well if you are interested in a positive integer only. Thanks for the nice RFC! Regards, Go Kudo Marc

[PHP-DEV] PHP6 artifact - binary strings

2015-02-08 Thread Marc Bennewitz
changed in the first place. The only changes *could* be done to functions reading/parsing data to be auto marked binary like: unpack, stream reading functions opened with fopen + "b" ... I don't have enough zend experience and therefore I would like to know how complicated it

Re: [PHP-DEV] PHP6 artifact - binary strings

2015-02-08 Thread Marc Bennewitz
Hi Andrea, Am 08.02.2015 um 22:09 schrieb Andrea Faulds: Hi, On 8 Feb 2015, at 20:10, Marc Bennewitz wrote: Since PHP-5.2.1 we have an artifact of PHP-6 in the engine means we can define binary strings but such definitions haven't any effect. Yes. That’s because PHP 6 was going to

Re: [PHP-DEV] Remove $this from incompatible context

2015-02-12 Thread Marc Bennewitz
ll break, not in the first place but later on! You propose that every instance method not using the variable $this internally will be magically a static method and can never ever be changed to use $this without an bc break. Marc -- PHP Internals - PHP Runtime Development Mailing L

Re: [PHP-DEV] Remove $this from incompatible context

2015-02-14 Thread Marc Bennewitz
knowledge into something using $this you break all code that calls the method statically. So for me a +1 to throw an E_DEPRECATED error in this case and remove this feature in PHP 8. This will inform existing applications about the wrong call and provide enough time to be fixed. Marc --

Re: [PHP-DEV] Remove $this from incompatible context

2015-02-15 Thread Marc Bennewitz
c break. (Personally I would like to see something like parent->doSomething() and self->doSomething() would work, too) Thanks Marc -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Re: [RFC] Exceptions in the engine

2015-02-23 Thread Marc Bennewitz
named Exception, which is by the way very often used as alias (use Exception as BaseExcepton). I know this isn't a technical issue but it reduces readability a code. What are your thoughts about the following names ?: RootException AbstractExcepton Marc -- PHP Internals - PHP Runtime D

[PHP-DEV] Proposal: deprecate undefined passed arguments

2015-02-23 Thread Marc Bennewitz
r user defined functions and for internal functions as well. Again, yes this one would introduces one more BC break but first this would be deprecated before disabled and next it's for reducing BC in the future. Marc -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Proposal: deprecate undefined passed arguments

2015-02-23 Thread Marc Bennewitz
Hi Marcio, Am 23.02.2015 um 21:15 schrieb Marcio Almada: 2015-02-23 16:32 GMT-03:00 Marc Bennewitz <mailto:dev@mabe.berlin>>: Hi all, Because the feature freeze for PHP 7 is near I like to know your thoughts about one more change in passing arguments. Sure this one

Re: [PHP-DEV] [RFC][DISCUSSION] Constructor behaviour of internal classes

2015-03-01 Thread Marc Bennewitz
Hi Dan, Am 01.03.2015 um 15:55 schrieb Dan Ackroyd: Hi Internals, This email is to announce the formal opening of discussion for an RFC to clean up the behaviour of the constructors shown by several internal classes. https://wiki.php.net/rfc/internal_constructor_behaviour I really like this R

Re: [PHP-DEV] [RFC][DISCUSSION] Constructor behaviour of internal classes

2015-03-01 Thread Marc Bennewitz
Am 01.03.2015 um 20:04 schrieb Dan Ackroyd: On 1 March 2015 at 18:35, Marc Bennewitz wrote: What are the reasons to not make this class instantiable / extendable ? That class handles database state / resources that are not exposed through the userland classes. It's correct in my opinio

Re: [PHP-DEV] 回复: [RFC][DISCUSSION] Add preg_replace_callback_array function

2015-03-20 Thread Marc Bennewitz
Am 20.03.2015 um 09:03 schrieb Wei Dai: Hi internals, Hi internals, The RFC to add a user-land function for an easy-to-use and reliable preg_replace_callback_array() in PHP is up for discussion: https://wiki.php.net/rfc/preg_replace_callback_array This proposes adding one function: `pre

Re: [PHP-DEV] 回复: [RFC][DISCUSSION] Add preg_replace_callback_array function

2015-03-21 Thread Marc Bennewitz
I also had a question! Didn't you noticed it? Am 20.03.2015 um 16:49 schrieb Marc Bennewitz: Why not simply allow the callback to be an array, too? Marc Am 21.03.2015 um 09:14 schrieb Xinchen Hui: Hey: On Fri, Mar 20, 2015 at 9:14 PM, Xinchen Hui wrote: Hey: On Fri, Mar 20, 2015 at

Re: [PHP-DEV] Exception hierarchy: open issues

2015-03-30 Thread Marc Bennewitz
Am 30.03.2015 um 12:58 schrieb Thomas Punt: Hey, Imho TypeException may not be best name for it, as it's also thrown for non-type related error conditions, like mismatched argument count. Would SignatureException be a more apt name for these error conditions? We already have an InvalidArgume

Re: [PHP-DEV] Deprecate setlocale?

2015-04-01 Thread Marc Bennewitz
there any reasons why we couldn't or shouldn't plan for removing setlocale at some point in the future? i.e. does it do something that isn't supported by other libraries in PHP? ii) If it's not possible (or desirable) to remove it, how could we increase the warning level against using it? cheers Dan Marc -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DEV] Overwrite return type-hint into a more specific one

2015-04-01 Thread Marc Bennewitz
.org/YdB8s - works fine (E_STRICT lower then php7@20150401) http://3v4l.org/UDk0n - Fatal error: Declaration of Bar::setTest() must be compatible with Foo::setTest($test): Foo http://3v4l.org/AuOsr - HHVM works fine Marc -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, v

Re: [PHP-DEV] Deprecate setlocale?

2015-04-01 Thread Marc Bennewitz
the given input). What I mean is that we should have basic functions addressing this. So for example we need a basic function to upper/lower case only ascii characters. Marc -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Deprecate setlocale?

2015-04-01 Thread Marc Bennewitz
hould be true for number formatting but it's not true for date format. -> I'm a german with comma (",") as decimal separator and I have never seen such a comma in microtime separation -> There is no way to define this behavior in a date format Marc -- PHP Internals -

Re: [PHP-DEV] Overwrite return type-hint into a more specific one

2015-04-01 Thread Marc Bennewitz
Hi Anthony, Am 01.04.2015 um 21:25 schrieb Anthony Ferrara: Marc, On Wed, Apr 1, 2015 at 2:46 PM, Marc Bennewitz wrote: Hi internals, On experimenting with return type-hints I noted an inconsistency on overwriting an existing hint to a more specific one. On adding a non existing return

Re: [PHP-DEV] [RFC][VOTE] Constructor behaviour of internal classes

2015-04-04 Thread Marc Bennewitz
Hi Nikita, Dmitry, I think it's a mistake to throw a TypeException on invalid argument count as in this case it has nothing to do with a type. Marc Am 03.04.2015 um 20:48 schrieb Dmitry Stogov: I don' t see any problems. Thanks. Dmitry. On Fri, Apr 3, 2015 at 6:31 PM, Nikita Po

Re: [PHP-DEV] Re: Fix division by zero to throw exception

2015-04-04 Thread Marc Bennewitz
Am 04.04.2015 um 00:13 schrieb Andrea Faulds: On 3 Apr 2015, at 23:08, Dmitry Stogov wrote: On Apr 4, 2015 12:34 AM, "Nikita Popov" wrote: Don't think we need to disable compile-time evaluation for 2) and 3). It'll just end up being a compile error in that case. I think if you have 1 % 0

Re: [PHP-DEV] [VOTE] Exceptions in the engine

2015-04-30 Thread Marc Bennewitz
ception vs. Throwable interface was called an implementation detail that can be changed later on. And on vote it was only some weeks before feature freeze so it would be impossible for the Throwable interface to pass before freeze. Julien.Pauli Marc -- PHP Internals - PHP Runtime Development Maili

Re: [PHP-DEV] [RFC] Throwable Interface

2015-05-24 Thread Marc Bennewitz
nternal functions with strict argument count. In my opinion a missing argument or to much arguments has nothing to do with the type and should have it's own Exception/Error class. Aaron Piotrowski Marc -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DEV] ::class wrong case

2015-05-25 Thread Marc Bennewitz
ll be much slower as with ::class. Are there any reasons to get the called case of the class instead or the original one? Marc -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] [RFC] Throwable Interface

2015-05-25 Thread Marc Bennewitz
On 05/24/2015 10:11 PM, Aaron Piotrowski wrote: On May 24, 2015, at 2:08 PM, Marc Bennewitz wrote: Where are the new classes and the interface located if it's not in the global namespace or do I muss something? Sorry if what I wrote wasn’t clear. Throwable, Error, TypeError

Re: [PHP-DEV] [RFC] Throwable Interface

2015-05-25 Thread Marc Bennewitz
On 05/24/2015 11:32 PM, Yasuo Ohgaki wrote: Hi Aaron, On Sun, May 24, 2015 at 5:12 AM, Aaron Piotrowski wrote: I’ve created an RFC for modifying the exception hierarchy for PHP 7, adding Throwable interface and renaming the exceptions thrown from fatal errors. The RFC is now ready for discu

Re: [PHP-DEV] Method call overhead

2015-06-04 Thread Marc Bennewitz
On 06/04/2015 06:35 AM, Yasuo Ohgaki wrote: Hi Brian, On Thu, Jun 4, 2015 at 7:33 AM, Brian Moon wrote: This is a better representation of what you are trying to show. It removes all the magic call back stuff that could be adding to the slowness you are seeing. In addition, it does not crea

Re: [PHP-DEV] Migrating PHP classes to built in namespace

2015-06-04 Thread Marc Bennewitz
On 06/04/2015 10:01 AM, Yasuo Ohgaki wrote: Hi all, On Thu, Jun 4, 2015 at 12:07 AM, Sara Golemon wrote: On Wed, Jun 3, 2015 at 1:33 AM, Dominic Grostate wrote: Has there been any discussion or consideration towards migrating or at least aliasing all built in classes to a Php vendor names

Re: [PHP-DEV] Headsup: PHP7 feature freeze

2015-06-25 Thread Marc Bennewitz
On 06/25/2015 05:03 PM, Kalle Sommer Nielsen wrote: Howdy This is a quick heads up that we plan to have the next release of 7.0.0 be Beta 1, this marks a feature freeze and from there on, we will switch focus on to stabilization, regressions and other bug fixes. Beta 1 is schedule to be tagge

Re: [PHP-DEV] Headsup: PHP7 feature freeze

2015-06-25 Thread Marc Bennewitz
On 06/25/2015 09:31 PM, Christoph Becker wrote: Marc Bennewitz wrote: I would really like to see directly calling a string of "Class::method" be fixed for 7.0. It's currently resulting in a fatal error and is inconsistent with call_user_func[_array], is_callable and the cal

Re: [PHP-DEV] Headsup: PHP7 feature freeze

2015-06-25 Thread Marc Bennewitz
On 06/25/2015 09:39 PM, Marc Bennewitz wrote: On 06/25/2015 09:31 PM, Christoph Becker wrote: Marc Bennewitz wrote: I would really like to see directly calling a string of "Class::method" be fixed for 7.0. It's currently resulting in a fatal error and is inconsistent with

Re: [PHP-DEV] Headsup: PHP7 feature freeze

2015-06-28 Thread Marc Bennewitz
On 06/25/2015 09:48 PM, Aaron Piotrowski wrote: On Jun 25, 2015, at 2:39 PM, Marc Bennewitz <mailto:dev@mabe.berlin>> wrote: Nice to see this - didn't noted it in the last month :) But there is one edge case that is not handled by PHP-7 at current behavior; http://3v4l.or

Re: [PHP-DEV] Headsup: PHP7 feature freeze

2015-06-28 Thread Marc Bennewitz
On 06/28/2015 09:22 PM, Christoph Becker wrote: Marc Bennewitz wrote: On 06/25/2015 09:48 PM, Aaron Piotrowski wrote: On Jun 25, 2015, at 2:39 PM, Marc Bennewitz mailto:dev@mabe.berlin>> wrote: Nice to see this - didn't noted it in the last month :) But there is one edge case

[PHP-DEV] DatePeriod microsecond support

2024-08-21 Thread Marc Bennewitz
y ask if this can be merged to be included in 8.4 or if I should do something else? [1] https://github.com/php/php-src/issues/13773 [2] https://github.com/php/php-src/pull/14581 Thanks, Marc OpenPGP_0x3936ABF753BC88CE.asc Description: OpenPGP public key OpenPGP_signature.asc Description: Op

[PHP-DEV] Bug #61033 __FUNCTION__ doesn't report correctly in alias trait methods

2012-02-09 Thread Marc Easen
o()'; } } $instance = new MyClass(); $instance->countdown(3); This example will produce running (PHP 5.4 RC7): 10 MyClass::foo() Which as you can see is not the desired effect. I send this email in the hope this can get the discussion under way regarding the magic consta

Re: [PHP-DEV] Bug #61033 __FUNCTION__ doesn't report correctly in alias trait methods

2012-02-12 Thread Marc Easen
On Fri 10 Feb 2012 09:49:54 GMT, Stefan Marr wrote: Hi Marc: On 09 Feb 2012, at 22:36, Marc Easen wrote: The reason why I feel this should be changes to reflect the actual called function name is that one of main uses of the __FUNCTION__ constant it to refer back to the function that is

Re: [PHP-DEV] Support negative indexes for arrays and strings

2012-06-04 Thread Marc Easen
I have submitted a patch to support negative indexs in strings, as per the conversation adding them to arrays could possibly detract from the syntactical sugar they are indented to be. In summary: An alternative to: $var = 'abc'; echo $var[strlen($var) - 1]; Can be: $var = 'abc'; echo $var[-1

Re: [PHP-DEV] Support negative indexes for arrays and strings

2012-06-11 Thread Marc Easen
On 11/06/12 20:28, Richard Lynch wrote: On Mon, June 11, 2012 2:13 pm, Stas Malyshev wrote: And then one would expect some rather complex logic to compute -N for $var[-N] I don't see much of complex logic here, but $a[2] = 'a' would create a new array element if it does not exist, while $a[-2]

Re: [PHP-DEV] Support negative indexes for arrays and strings

2012-06-11 Thread Marc Easen
On 11/06/12 20:13, Stas Malyshev wrote: Hi! Can be: $var = 'abc'; echo $var[-1]; This seems simple enough for a hard-coded -1, but... Would $var[-2] be strlen($var) - 2 and so on? The main question is what happens with "foo"[-4] or ['x'][-2]. And then one would expect some rather complex l

Re: [PHP-DEV] Support negative indexes for arrays and strings

2012-06-17 Thread Marc Easen
eone give me access to create a page on the RFC site or create a RFC for me and give me permission to update it, my username is 'easen'. Thanks, Marc On 17/06/12 15:14, Lars Strojny wrote: Hi Marc, Am 11.06.2012 um 23:01 schrieb Marc Easen: [...] I don't see much of complex

[PHP-DEV] moving extensions to pecl

2005-08-03 Thread Marc Boeren
php' action. Should it not be policy to require the necessary packaging for pecl _before_ the source is moved in cvs? Ciao, Marc. -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP-DEV] moving extensions to pecl

2005-08-04 Thread Marc Boeren
and tarball > and releasing dbx via PECL, Marc? I wouldn't mind but I don't know when I can find some time. Is there some documentation available for the packaging process? I couldn't find a clear pointer on pecl.php.net. > Let me know if you need an account for the PECL site

RE: [PHP-DEV] moving extensions to pecl

2005-08-04 Thread Marc Boeren
, such as getting it in the packages list, perhaps the docs should mention it is in pecl too, that kind of thing. > Plus it does have a package.xml. Added in 2004/03/24.. Ah, I missed that. So what is needed to get it on the pecl site in the packages list? Ciao, Marc. -- PHP Internals -

RE: [PHP-DEV] moving extensions to pecl

2005-08-04 Thread Marc Boeren
; > For all of these steps you need the necessary PECL Karma > which you can > apply to with this form: > http://pecl.php.net/account-request.php Not if I want to keep my existing username :) I'm following up this thread in pecl-dev with my request for pecl-karma. Cheers, Marc.

Re: [PHP-DEV] PHP 6.0 Wishlist

2005-08-14 Thread Marc Richards
"msession" or "mysql" depending on the user's needs. Marc -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] PHP 6.0 Wishlist

2005-08-14 Thread Marc Richards
Marc Richards wrote: Rasmus Lerdorf wrote: Jani Taskinen wrote: On Sun, 14 Aug 2005, Ilia Alshanetsky wrote: If apc comes bundled then it includes apc_store() and apc_fetch() this is pretty much $_MEMORY with a few tweaks. Yes, but that is restricted to one server installations

Re: [PHP-DEV] PHP 6.0 Wishlist

2005-08-15 Thread Marc Richards
Phorum when both of them try to update $_GLOBAL_SESSION['counter']. Basically to enforce application level scoping...which is part of the reason I think $_APPLICATION is a better name. Marc -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] PHP 6.0 Wishlist

2005-08-15 Thread Marc Richards
rying to refute your point, just saying that there may be things you hadn't considered. Marc -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] PHP 6.0 Wishlist

2005-08-15 Thread Marc Richards
Marc Richards wrote: Zeev Suraski wrote: At 18:50 15/08/2005, Rasmus Lerdorf wrote: Zeev Suraski wrote: > (*) Based on the fact php-general@ has 787 subscribers and current > estimates at the amount of PHP developers worldwide range between > 500,000 to 2,000,000 developers. I

[PHP-DEV] CVS Account Request: marctm

2005-08-29 Thread Marc Torrano
I'm requesting a CVS account because I'm going to take part in the Catalan translation project of the PHP documentation -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP-DEV] my last attempt at sanity with namespaces

2008-10-16 Thread Marc Boeren
to worry about ambiguity or bc-issues. Disclaimer: I have not written any namespaced php code yet (so I'm not worried about con #1 ;-)). Ciao, Marc. -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DEV] PHP 5.2.0 Openssl PKCS12 patch

2006-12-15 Thread Marc Delling
Hello, I'm Marc and I'm new to this list. Whew! That was easy! I've read in the archive about a patch for supporting openssl pkcs12, but nothing seems to be done so far. Since I was missing the same thing when trying to code a quick-and-dirty certificate management weba

Re: [PHP-DEV] Locale-independent double-to-string cast

2013-10-03 Thread Marc Bennewitz
n named "number_format" and since PHP 5.3 the class "NumberFormatter". Additionally "setlocale" is a process operation that makes issues on multi threaded envs. So temporary reset the locale isn't same, too. My little two cent from germany Marc -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Use of php_mt_rand() rather than php_rand()

2014-07-21 Thread Marc Bennewitz
Hi Yasuo, Some times ago I mailed my idea about refactoring random number generator API with min BC breaks but I didn't create an RFC right now. see http://marc.info/?l=php-internals&m=137772363015217 Marc On 16.07.2014 07:13, Yasuo Ohgaki wrote: Hi all, There are few places

[PHP-DEV] unsinged integer

2014-07-22 Thread Marc Bennewitz
ll be also useful to make sure you have no negative integer by simply converting to it. What do you think? (Does it worth the expense for a RFC?) Marc -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DEV] ML issue: new tld's like ".berlin" doesn't work

2014-07-22 Thread Marc Bennewitz
Hi all, I have a new email address ending "@mabe.berlin" but I can't confirm this in the ML :( Marc -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DEV] unsinged integer

2014-07-22 Thread Marc Bennewitz
ll be also useful to make sure you have no negative integer by simply converting to it. What do you think? (Does it worth the expense for a RFC?) Marc -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DEV] unsinged integer

2014-07-22 Thread Marc Bennewitz
ll be also useful to make sure you have no negative integer by simply converting to it. What do you think? (Does it worth the expense for a RFC?) Marc -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] unsinged integer

2014-07-22 Thread Marc Bennewitz
ups (typo + copy past error) It's not my day today! On 22.07.2014 22:21, Rowan Collins wrote: > On 22/07/2014 20:55, Marc Bennewitz wrote: >> I like to create an RFC to add an unsinged integer type > > +1 for not turning the iron up too high when doing you

Re: [PHP-DEV] unsigned integer

2014-07-22 Thread Marc Bennewitz
I mean a new scalar type here On 22.07.2014 22:33, Nikita Popov wrote: > On Tue, Jul 22, 2014 at 9:55 PM, Marc Bennewitz > wrote: > >> Hi all, >> >> I like to create an RFC to add an unsigned integer type for the >> following purposes: >> >> - highe

Re: [PHP-DEV] unsigned integer

2014-07-22 Thread Marc Bennewitz
Hi Andrea, very nice RFC! You have added the new type internally only. Does it make sense or would it be possible to use one more internal type like "ULONG" to safe mem/cpu in such cases because bigint/GMP objects are used only on much higher numbers? Marc On 23.07.2014 00:12, And

[PHP-DEV] directly call a callable

2014-08-05 Thread Marc Bennewitz
Hi internals, I have opened a PR in april but since that there is no process on it. Please tell me if there are open questions / todos. https://github.com/php/php-src/pull/659 Marc -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DEV] Improved logarithm of base 2|10 of standard math function

2014-08-14 Thread Marc Bennewitz
ithout any comments! Please please please someone there to merge this. PS: Because of after this PR the following will be the same in PHP log10(x) === log10(x) the function log10 is needless and could be deprecated/removed. I will create an RFC if this PR was merged. Marc -- PHP Internals - P

  1   2   3   4   >