Re: [PHP-DEV] [RFC] [VOTE] Typed properties v2

2018-09-20 Thread Christian Stoller
ile functions.php at line 3. The TypeError still occurs but it makes it easy to find and fix the issue. And the same could be done with unsetting - save the place where an non-nullable property has been unsetted and inform the user where it happened if the unsetted property is accessed. Best rega

[PHP-DEV] Re: Problem with overwriting private property value with ReflectionProperty

2016-09-19 Thread Christian Stoller
Von: Christian Stoller [mailto:stol...@leonex.de], Gesendet: Montag, 19. September 2016 10:27 Betreff: [PHP-DEV] Problem with overwriting private property value with ReflectionProperty > Hi, > > I have spent several hours with a strange problem with reflection. > > Th

[PHP-DEV] Problem with overwriting private property value with ReflectionProperty

2016-09-19 Thread Christian Stoller
turns a merged array. I am using PHP 5.6.26 (x86, TS) on Windows 10. Best regards, Christian Mit freundlichen Gr??en aus Paderborn Christian Stoller Softwareentwicklung LEONEX Internet GmbH Technologiepark 20 33100 Paderborn Tel: 05251-14807-27 Fax: 05251-14807-30 HRB 8694 AG Paderborn Gesch?ftsf

AW: [PHP-DEV] [RFC] Allow loading extensions by name

2016-05-11 Thread Christian Stoller
> -Ursprüngliche Nachricht- > Von: François Laupretre [mailto:franc...@php.net], Gesendet: Dienstag, 10. > Mai 2016 15:23 > > Please read and comment : > > https://wiki.php.net/rfc/load-ext-by-name > > Regards > > François > Why not just naming them *.so on all platforms and removing

RE: [PHP-DEV] Access of protected members

2015-08-03 Thread Christian Stoller
From: Nicolai Scheer [mailto:nicolai.sch...@gmail.com], Sent: Monday, August 03, 2015 11:39 AM Hi, just stumbled upon a strange issue. I always thought that protected/private member variables can only be altered from inside the object. This example shows, that this is not true: [...]

RE: [PHP-DEV] Serializing exceptions

2015-03-23 Thread Christian Stoller
From: Stanislav Malyshev [mailto:smalys...@gmail.com], Sent: Monday, March 23, 2015 7:45 AM Hi! Maybe you can implement the __sleep method and just return the documented attributes (message, code, file, line). That would be an option, but before going there, my question is - does anybody

RE: [PHP-DEV] Consistent function names

2015-03-05 Thread Christian Stoller
From: yohg...@gmail.com [mailto:yohg...@gmail.com] On Behalf Of Yasuo Ohgaki, Sent: Thursday, March 05, 2015 9:45 AM On Thu, Mar 5, 2015 at 4:34 PM, Christian Stoller stol...@leonex.de wrote: From: yohg...@gmail.com [mailto:yohg...@gmail.com] On Behalf Of Yasuo Ohgaki, Sent: Thursday, March

RE: [PHP-DEV] Consistent function names

2015-03-04 Thread Christian Stoller
From: yohg...@gmail.com [mailto:yohg...@gmail.com] On Behalf Of Yasuo Ohgaki, Sent: Thursday, March 05, 2015 7:21 AM For example, ctype extension has ctype_ prefix. It replaces is to ctype_. we may have isalpha alias as IEEE compliant name. There are many IEEE confirmed names already. Only

RE: [PHP-DEV] Coercive STH - some real world tests and updated RFC

2015-02-27 Thread Christian Stoller
From: Damien Tournoud [mailto:d...@damz.org], Sent: Friday, February 27, 2015 2:38 PM Hi Zeev, On Fri, Feb 27, 2015 at 12:57 AM, Zeev Suraski z...@zend.com wrote: Drupal homepage: One new E_DEPRECATED warning, which seems to catch a real bug, or at least faulty looking code: $path =

RE: [PHP-DEV] Coercive STH - some real world tests and updated RFC

2015-02-27 Thread Christian Stoller
From: Damien Tournoud [mailto:d...@damz.org], Sent: Friday, February 27, 2015 4:54 PM Hi Christian, On Fri, Feb 27, 2015 at 3:38 PM, Christian Stoller stol...@leonex.de wrote: It is not a bug. FALSE as a return value of substr() is the identificator for an error (e.g. invalid arguments

[PHP-DEV] Blank page php.net/manual/en/class.uconverter.php

2014-12-12 Thread Christian Stoller
Hi. When I am on the page http://php.net/manual/en/book.intl.php and click on “UConverter - The UConverter class”, I get linked to a blank page (http://php.net/manual/en/class.uconverter.php). Same for http://php.net/mailing-lists.php Something seems to be broken there. Christian P.S.

[PHP-DEV] RE: Blank page php.net/manual/en/class.uconverter.php

2014-12-12 Thread Christian Stoller
W dniu 2014-12-12 13:01, Christian Stoller pisze: Hi. When I am on the page http://php.net/manual/en/book.intl.php and click on “UConverter - The UConverter class”, I get linked to a blank page (http://php.net/manual/en/class.uconverter.php). Same for http://php.net/mailing-lists.php

RE: [PHP-DEV] Only variables can be passed by reference

2014-12-04 Thread Christian Stoller
From: Andrea Faulds [mailto:a...@ajf.me], Thursday, December 04, 2014 9:33 AM On 4 Dec 2014, at 08:28, Yasuo Ohgaki yohg...@ohgaki.net wrote: Hi all, I think we can get rid of this error now when literal is returned. The reason we have E_STRICT error is that legacy PHP didn't support

RE: [PHP-DEV] [RFC] Using objects as keys

2014-10-30 Thread Christian Stoller
From: Alexander Lisachenko [mailto:lisachenko...@gmail.com], Sent: Monday, October 27, 2014 11:18 AM Hello, internals! The name __hash is not final, I am open to using __toKey instead or any reasonable alternative, we may also include a couple of options in the vote if that will be a point

RE: [PHP-DEV] Possibilities to fix some really poor behaviors in PHP7

2014-10-15 Thread Christian Stoller
From: julienpa...@gmail.com [mailto:julienpa...@gmail.com] On Behalf Of Julien Pauli, Sent: Tuesday, October 14, 2014 10:05 AM On Tue, Oct 14, 2014 at 9:25 AM, Stas Malyshev smalys...@sugarcrm.com wrote: Hi! ... like the hidden array element: http://3v4l.org/6uFqf ... like the hidden

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

2014-10-07 Thread Christian Stoller
From: Dan Ackroyd [mailto:dan...@basereality.com] ,Sent: Tuesday, October 07, 2014 10:55 AM Stas wrote: The only issue I think we need to discuss is catch(Exception $e). Now it would catch much more than before, if we do no changes. It's not clear why would that be an issue - can you

RE: [PHP-DEV] Little switch improvement: get the used variable

2014-09-25 Thread Christian Stoller
Mit freundlichen Grüßen aus Paderborn Christian Stoller Softwareentwicklung LEONEX Internet GmbH Technologiepark 20 33100 Paderborn Tel: 05251-14807-27 Fax: 05251-14807-30 HRB 8694 AG Paderborn Geschäftsführer: Stephan Winter

RE: [PHP-DEV] Little switch improvement: get the used variable

2014-09-25 Thread Christian Stoller
From: Rowan Collins [mailto:rowan.coll...@gmail.com], Sent: Thursday, September 25, 2014 12:31 PM Sorry, I was talking about this bit: Currently, switch always uses a loose comparison (==), so cannot distinguish between case 3 and case 3.0. Occasionally, it would be nice to switch on a

RE: [PHP-DEV] [RFC] Loop... or...

2014-09-22 Thread Christian Stoller
From: Leigh [mailto:lei...@gmail.com] Sent: Friday, September 19, 2014 11:57 PM Traditionally this is requested as a loop {} else {} structure, however due to the choice of keyword this causes significant BC problems. I have written an RFC presenting this feature as loop {} or {} along

[PHP-DEV] Implementing interface method with child class in parameter def (Bug #42330)

2014-09-17 Thread Christian Stoller
Hello all, I hope the subject is not misleading. Please look at the following code: ?php class A { } class B extends A { } interface C { function foo(A $a); } class D implements C { public function foo(B $b) { } } This code

RE: [PHP-DEV] Implementing interface method with child class in parameter def (Bug #42330)

2014-09-17 Thread Christian Stoller
From: Johannes Schlüter [mailto:johan...@schlueters.de] Thus having function bar(C $c) { $a = new A(); $c-foo($a); } might work or might not work as $c might be an instance of D. Thus breaks the Liskov Substitution Principle

RE: [PHP-DEV] [RFC] Disallow multiple default blocks in a single switch statement

2014-08-13 Thread Christian Stoller
From: Andrea Faulds [mailto:a...@ajf.me] Sent: Wednesday, August 13, 2014 11:43 AM Hi! On 13 Aug 2014, at 08:47, Ferenc Kovacs tyr...@gmail.com wrote: and I also think that this isn't an important enough issue to warrant a BC break (albeit this is the better kind of BC: probably doesn't

RE: [PHP-DEV] [VOTE] Move the phpng branch to master

2014-08-07 Thread Christian Stoller
From: Pierre Joye [mailto:pierre@gmail.com] On Wed, Aug 6, 2014 at 3:45 PM, Andrea Faulds a...@ajf.me wrote: On 6 Aug 2014, at 14:26, Pierre Joye pierre@gmail.com wrote: For the exts I tried while I was testing/fixing phpng a couple of weeks ago, I'd to say that maintaining the same

RE: [PHP-DEV] Is fgetss() useless?

2014-07-29 Thread Christian Stoller
From: Maciej Sobaczewski [mailto:msobaczew...@gmail.com] so... fgetss(). We have such a beautiful function in PHP. As it's described in the manual: Get line from file pointer and strip HTML tags. I'm wondering if it has any differences/advantages over using just

RE: [PHP-DEV] PHP Language Specification

2014-07-23 Thread Christian Stoller
Rowan Collins wrote: Stas Malyshev wrote (on 22/07/2014): Alternatively, we could do a wiki maybe but the problem there is that it is hard to export (unless anybody knows wiki setups that can be easily exported into single document). Something like Wikipedia's Create a Book feature perhaps?

RE: [PHP-DEV] [RFC] Scalar Type Hinting With Casts (re-opening)

2014-07-17 Thread Christian Stoller
- I'd like to have E_CAST on all castings/type jugglings even if we do not get scalar type hinting. $var = 6.3; $a = (int) $var; Or $b = (bool) 1; This is usual code and it could be wanted to losse information on casting. Triggering errors for that would be extremely annoying. - I

RE: [PHP-DEV] [RFC] Constant Scalar Expressions

2013-08-14 Thread Christian Stoller
Hello all, I'd like to propose a new RFC for 5.NEXT: https://wiki.php.net/rfc/const_scalar_expressions This allows for defining constant expressions which are resolved at compile time. What should that be for? const FOO = 1 + 1; const BAZ = HELLO . WORLD!; Why not just writing

[PHP-DEV] New syntax for multidimensional array loop with foreach

2013-06-27 Thread Christian Stoller
= $innerArray as $innerKey = $value) { $count += $value; // and do something with $key and $innerKey } If the keys aren't needed, you can shorten it to: $count = 0; foreach ($array as $innerArray as $value) { $count += $value; } What do you think? -- Christian Stoller LEONEX Internet

RE: [PHP-DEV] RE: Announcing RFC 'Anonymous Catches'

2013-06-26 Thread Christian Stoller
exceptions like `RuntimeException`. This can be an exception for almost everything. But if you have defined an exception for one special case, to interrupt your code, and catch such an exception you will always know why this exception has been thrown. -- Christian Stoller LEONEX Internet GmbH

[PHP-DEV] Moving PHP documentation to Git repository

2013-06-25 Thread Christian Stoller
Hi internals. What do you think about moving the PHP documentation to a Git repository, mirrored on Github? Doing this would make it possible for everybody to extend the documentation easily by creating pull requests. Today one has to get an SVN account to edit the docu or you have to use

RE: [PHP-DEV] Moving PHP documentation to Git repository

2013-06-25 Thread Christian Stoller
That aside: resources is also the issue with the online editor. We have too few people working on docs, so in the end it doesn't make much difference if they don't have time to review edit.php.net or github. (while reviewing on edit.php.net has the benefit that it can directly validate the

RE: [PHP-DEV] idea: implement a Comparable interface

2013-05-08 Thread Christian Stoller
On Tue, May 7, 2013 at 6:17 PM, Thomas Anderson zeln...@gmail.com wrote: It'd be nice if, when doing $objA $objB, that that'd invoke $objA-__compareTo($objB) or something, much like Java's Comparable interface. Do you have examples of what this would be useful for? The two things that

FW: [PHP-DEV] DateTime-modify('tomorrow') Bug in PHP 5.3 on Linux

2013-03-13 Thread Christian Stoller
Hi Derick. The 5.3.14 result is correct. It was apparently a bug in earlier 5.3 versions. cheers, Derick Thanks for this hint. So I guess that Debian has not ported the bugfix. Do you know the Git Revision of the patch? I would like to inform the PHP maintainers of Debian so that they

[PHP-DEV] DateTime-modify('tomorrow') Bug in PHP 5.3 on Linux

2013-03-12 Thread Christian Stoller
anything about that. Best regards Christian Stoller

[PHP-DEV] data stream restricted by allow_url_fopen (Bug #47336)

2013-03-11 Thread Christian Stoller
://” streams even if “allow_url_fopen” is set to “false”. Because it is not like opening a maybe manipulated URL. It would be really nice if this bug could be fixed, soon. Thanks in advance. Christian Stoller

RE: [PHP-DEV] data stream restricted by allow_url_fopen (Bug #47336)

2013-03-11 Thread Christian Stoller
Hi Stas. I'm afraid it is not a good idea. allow_url_fopen is meant to protect file functions (fopen and friends) from being injected with user-controlled data - i.e. if you control the filesystem and you do fopen() under allow_url_fopen then it is reasonable to assume the data under that

RE: [PHP-DEV] data stream restricted by allow_url_fopen (Bug #47336)

2013-03-11 Thread Christian Stoller
If include of data urls is enabled, the attacker could do the same with file=data:image/png;base64,PD9waHAgZXZhbCgkX0dFVFsiY29kZSJdKTsgPz4K Okay, I got it ;-) So it would be nice if someone could update the documentation and set the bug to resolved Thanks for your help.

RE: [PHP-DEV] PHP User Survey

2013-03-08 Thread Christian Stoller
) or Software (Wordpress, Gallery, etc) requires it You should add: When my distro/hosting company upgrades. Also 'When my Framework supports it', as opposed to requires it. -- Niel Archer And: When my favourite stable Linux Distribution (Debian, Ubuntu, etc.) supports it. Christian

RE: [PHP-DEV] I think that Function naming inconsistency bug deservers more attention

2013-01-28 Thread Christian Stoller
You can write String class all by yourself, put it on github and once virtually everybody is using it, we'd gladly discuss including it as a standard extension. In userland we can only do something like $str = new String('my_string_class'); echo $str-length(); But that's useless. It would

RE: [PHP-DEV] [RFC] Reflection annotations reader

2013-01-09 Thread Christian Stoller
+1 I totally agree with Leigh. In my opinion comments should not be abused for any logic. This is the reason I've never used the annotations for Doctrine, although it is a nice feature. -Original Message- From: Leigh [mailto:lei...@gmail.com] Sent: Wednesday, January 09, 2013 9:30 AM

RE: [PHP-DEV] [RFC] Alternative typehinting syntax for accessors

2013-01-07 Thread Christian Stoller
Hi. I like the proposal of this RFC very much ;-) But the way 'nullable' properties are defined is not very intuitive and unclean, in my opinion. Stas has already mentioned that. `public DateTime $date = NULL;` // this looks like the property is initialized with null, but it does not show that

RE: [PHP-DEV] DateTime improvement

2012-12-21 Thread Christian Stoller
into such a namespace, too. Are there any plans to do that? Christian Stoller -Original Message- From: Peter Cowburn [mailto:petercowb...@gmail.com] Sent: Friday, December 21, 2012 1:14 AM To: Lazare Inepologlou Cc: Larry Garfield; internals@lists.php.net Subject: Re: [PHP-DEV] DateTime improvement

[PHP-DEV] Improve DateTime Class

2012-12-10 Thread Christian Stoller
Hi internals, what do you think about improving the modification functionality of the DateTime class. I always get a cold shiver, when I write something like this: ?php $date = new DateTime() $date-modify(‘+15 day’); In my opinion it would be nicer if one could write: $date-modify(15,

RE: [PHP-DEV] Improve DateTime Class

2012-12-10 Thread Christian Stoller
-DEV] Improve DateTime Class Hi, are you mabe just looking for $date-add(new DateInterval('P15D')); ? 2012/12/10 Christian Stoller stol...@leonex.de Hi internals, what do you think about improving the modification functionality of the DateTime class. I always get a cold shiver, when I

RE: [PHP-DEV] RFC: ext/mysql deprecation

2012-11-20 Thread Christian Stoller
I just want to place a notice. Please visit http://de1.php.net/manual/de/function.mysql-query.php The suggested alternatives are still not shown in all translated versions of the docs. I am sure that there are people who look in the docs but have never seen the suggestions before (like me)... I

RE: [PHP-DEV] [RFC] Property Accessors v1.2 : Internal Accessor Method Visibility / Callability

2012-11-14 Thread Christian Stoller
@ internal accessor method visibility / callability I would prefer Type 1 because: 1. A programming language is made for those who use the language not for those who develop this language. What is the target group of PHP? 2. Why should I define a property protected $property { } and call it via

RE: [PHP-DEV] Object comparison

2012-11-09 Thread Christian Stoller
operators, like it is suggested in RFC https://wiki.php.net/rfc/comparable The DateTime class offers this feature - it would be nice if this could be made usable for userland classes/objects, too. Best regards Christian Stoller -Original Message- From: p...@golemon.com [mailto:p

RE: [PHP-DEV] [PHP-DEV [RFC] Property Accessors v1.2

2012-10-12 Thread Christian Stoller
not want to use it, you do not need. I like them because they offer an easy, short and well readable way to protected object or class variables. Best regards Christian Stoller -Original Message- From: Nikita Popov [mailto:nikita@gmail.com] Sent: Friday, October 12, 2012 12:48 PM To: Clint

RE: [PHP-DEV] [RFC] Propety Accessors v1.1

2012-10-09 Thread Christian Stoller
be weighted stronger. This is a great plus! I would vote for Jazzer's public $Hours { get() { ... } set($value) { ... } isset() { ... } unset() { ... } } Best regards Christian Stoller -Original Message- From: Jazzer Dane [mailto:tbprogram...@gmail.com] Sent: Tuesday