Re: [PHP-DEV] Introduction - Sam Lewis

2025-02-08 Thread Sam Lewis
ecome more obvious to me as well. Thanks again for your friendly and informative responses, they are a model for how to welcome a new person to any community! Sam

Re: [PHP-DEV] Introduction - Sam Lewis

2025-02-08 Thread Sam Lewis
ase the value proposition of the RFC enough to be worth considering more seriously. Sam On Sat, Feb 8, 2025 at 10:05 AM Rob Landers wrote: > On Sat, Feb 8, 2025, at 15:58, Tim Düsterhus wrote: > > Hi Sam > > On 2/8/25 15:30, Sam Lewis wrote: > > they wished PHP had

[PHP-DEV] Introduction - Sam Lewis

2025-02-08 Thread Sam Lewis
hange to learn how to contribute to PHP itself. So here I am! I'd like edit access to the Wiki so I can submit a proper RFC. My Wiki username is samldev. Thanks! Sam Lewis

Re: [PHP-DEV] Re: [RFC][Under discussion] RFC1867 for non-POST HTTP verbs

2023-12-07 Thread Sam I
Hey, I'm not sure if this is bikeshedding, but the concept of parsing bodies for non-POST requests lands really close to a proposal for adding a QUERY method to the HTTP standard. Draft: https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-safe-method-w-body Discussion: https://github.com/httpw

Re: [PHP-DEV] Request to create a RFC for const args

2023-06-19 Thread Sam McDonald
He6 Olle, Yes more so the former, not the latter in your example. If there is already an rfc in place then that is fantastic. Regards SAM Sent from Outlook for Android<https://aka.ms/AAb9ysg> From: Olle Härstedt Sent: Monday, June 19, 2023 7:47:49 PM T

[PHP-DEV] Request to create a RFC for const args

2023-06-19 Thread Sam McDonald
ch as arrays and classes, if a 'const' arg is provided, while in the function it can not be reassigned. Please let me know if this is something the team is interested in and if I should proceed. Kind regards. Sam McDonald. Sent from Outlook for Android<https://aka.ms/AAb9ysg>

Re: [PHP-DEV] return values of socket_recvmsg

2018-01-26 Thread Sam Ding
uint32_t property_guard; uint32_t extra; } u2; } * How do these two variables match between php and C? Thanks, Sam Sam Ding/Toronto/IBM wrote on 01/26/2018 09:36:00 AM: > From: Sam Ding/Toronto/IBM > To: Kalle Sommer Nielsen > Cc: PHP internals , kalle@gmail.com > Date: 0

Re: [PHP-DEV] return values of socket_recvmsg

2018-01-26 Thread Sam Ding
Thank Kalle, I knew the implementaion of socket_recvmsg(), but want to know the return data structure. The test on Big_endian (s390x) got a little different return result than on x86_64, try to dig out where the problem is. Thanks, Sam kalle@gmail.com wrote on 01/26/2018 01:58:23 AM

[PHP-DEV] return values of socket_recvmsg

2018-01-25 Thread Sam Ding
symbol_table; void **run_time_cache; zval *literals; } * Where do the above output values (line 18-21) store in the struct _zend_execute_data ? Thanks, Sam

[PHP-DEV] v7.2.1 test cases crash on s390x

2018-01-22 Thread Sam Ding
why StateCheckNumType is defined as short int, but others are all int. If change it as "int", two crashes are gone and 5 cases related to "mb_ereg() " are passed. Testing on x86_64 show 5 cases are alos passed (same as before). Thanks, Sam

Re: [PHP-DEV] Big_Endian problem

2018-01-22 Thread Sam Ding
Thank Sara. Yes, on s390x, it is broken. The function "ignore_user_abort" returns "256" on s390x, and "1" on x86_64 after "ignore_user_abort" is set to true; Please let me know when you finished code changes on v7.2.1. I will test on s390x. Thanks, Sa

[PHP-DEV] Big_Endian problem

2018-01-19 Thread Sam Ding
nterpreter support Big_Endian? Are there any existing macros/functions to deal with Big/Little Endian? Thanks, Sam Ding

[PHP-DEV] function stream_isatty

2018-01-18 Thread Sam Ding
There are 5 test cases that have different results between s390x and x86_64: |-| |Test stream_isatty with redirected STDERR| |tests/output/stream_isatty_err.phpt.]

[PHP-DEV] unit test a single case

2018-01-17 Thread Sam Ding
Hi PHP developers, I am new and try to porting php v7.2.1 on IBM s390x, after building and run unit test "make test", there are some failed cases. Is there any way I can run a single case and get the result? Further how to debug a php unit case code? Thanks, Sam Ding, Linux on z Sys

[PHP-DEV] request to add

2018-01-17 Thread Sam Ding
Sam Ding, Linux on z Systems Open Source Ecosystem IBM Toronto Lab, email: samd...@ca.ibm.com phone: (905)413-2947

[PHP-DEV] Editing the wiki

2016-09-20 Thread Sam Hobbs
Login: simplesamples Real Name: Sam Hobbs I intend to improve the following article: PHP: internals:windows:stepbystepbuild https://wiki.php.net/internals/windows/stepbystepbuild -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DEV] VCS Account Request: covibe

2014-10-13 Thread Daniel Sam
to contribute to the PHP source regularly. -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] RFC ? gethostbyname - getnameinfo()

2013-03-27 Thread Sam Hermans
Not sure, I tried something locally and this is what i came up with (and what i think expected behaviour could be) wrote: > I agree, PHP should have world-class support for v6. What is your proposal > exactly? > > Am 27.03.2013 um 13:39 schrieb Sam Hermans : > >> Hi,

[PHP-DEV] RFC ? gethostbyname - getnameinfo()

2013-03-27 Thread Sam Hermans
ke the lead on this one. Please let me know what you guys think, and thank you for your time. Kind regards, Sam Hermans -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] How hard should PHP try to finish a script?

2012-06-17 Thread sam . e . giles
rface but it is only for some edge cases such as loading some concrete implementation that your script has no prior knowledge about, if it's incorrect your application can't recover, but this can be avoided anyway I think. Sam Sent from my BlackBerry® smartphone -Original Message---

Re: [PHP-DEV] Randomize hash-function in php

2012-03-17 Thread Sam
similarly. The benchmarks weren't robust as they were only quick, 'let's hack and see' tests. Would be interesting if anyone else has had a go. If I can find it I'll post a patch so you could? Cheers Sam

RE: [PHP-DEV] [VOTE] 5.4 features vote

2011-07-13 Thread Moshe, Sam
13.07.2011 21:50, schrieb Moshe, Sam: > What's so wrong with magic quotes that they need to be removed from > the language entirely? they are idiotic because useless for escaping database inputs and you need to find out this setting to remove them by stripslashes() if enabled fro

RE: [PHP-DEV] [VOTE] 5.4 features vote

2011-07-13 Thread Moshe, Sam
I'm sure this has been discussed, but I'm new here, and uncertain as to where to go to get caught up. What's so wrong with magic quotes that they need to be removed from the language entirely? Links of advice would be helpful. Thanks. -Original Message- From: Stas Malyshev [mailto:smalys.

[PHP-DEV] Status on Traits

2011-05-09 Thread Kalkin Sam
Hi, what is the status of traits, or like the wiki calls it "Horizontal Reuse for PHP". AFAIR I got notice of it on the FrOsCon 2008/2009(?), since then lot time passed and the last update on the wiki ist from November last Year. I'm just curious, when will this feature be implemented in a stable

Re: [PHP-DEV] Experiments with a threading library for Zend: spawning a new executor

2011-01-19 Thread Sam Vilain
On 20/01/11 10:17, Ángel González wrote: > Have you taken a look at Runkit_Sandbox? It may provide useful tips. *headdesk* No, I hadn't seen that. Thanks for pointing this out, it looks like exactly what I was trying to reinvent... Cheers, Sam. -- PHP Internals - PHP Runtime Dev

[PHP-DEV] [citations for] Re: [PHP-DEV] Experiments with a threading library for Zend: spawning a new executor

2011-01-19 Thread Sam Vilain
On 19/01/11 16:14, Sam Vilain wrote: > In general, Java's basic types typically correspond with types that can > be dealt with atomically by processors, or are small enough to be passed > by value. This already makes things a lot easier. > > I've had another reason for

Re: [PHP-DEV] Experiments with a threading library for Zend: spawning a new executor

2011-01-18 Thread Sam Vilain
On 19/01/11 10:50, Stefan Marr wrote: > On 18 Jan 2011, at 22:16, Sam Vilain wrote: >> there doesn't seem to >> be an interpreter under the sun which has successfully pulled off >> threading with shared data. > Could you explain what you mean with that statement? &

Re: [PHP-DEV] Experiments with a threading library for Zend: spawning a new executor

2011-01-18 Thread Sam Vilain
multithreaded PHP with these libraries may > cause various trouble. Yes, currently I am not looking at calling individual module startup functions to avoid this problem (and save time on thread startup). It seems that there is a facility for limiting the available functions visible to the creat

[PHP-DEV] [url fixes for] Experiments with a threading library for Zend: spawning a new executor

2011-01-18 Thread Sam Vilain
On 18/01/11 17:21, Sam Vilain wrote: > (full code is available at http://github.com/openparallel/php-src.git ) *ahem* that should be http://github.com/openparallel/php-src In fact to skip straight to the function, try http://github.com/openparallel/php-src/blob/9205db3/ext/tbb/tbb.c#L

[PHP-DEV] Experiments with a threading library for Zend: spawning a new executor

2011-01-17 Thread Sam Vilain
pcodes and nothing relevant to this. Thanks in advance for any help! Cheers, Sam 1 - http://openparallel.wordpress.com/2010/11/01/tbb-in-wordpress-–-white-paper/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] [RFC] Strict type hints (parameter and return value)

2008-06-20 Thread Sam Barrow
On Thu, 2008-06-19 at 20:07 +0200, Timm Friebe wrote: > Hi, > > >> I like this generally, but cannot live with the BC issues raised. > >> Introducing all type names as keywords will make "class Object", "class > >> Integer" and so on give a syntax error. > > > > That's actually not true, the pa

Re: [PHP-DEV] [RFC] Strict type hints (parameter and return value)

2008-06-15 Thread Sam Barrow
On Sun, 2008-06-15 at 11:44 +0200, Timm Friebe wrote: > Hi, > > > If anyone wants use type hinting, i believe that it should be strict. > > Otherwise, it makes more sense to not use it. > > I like this generally, but cannot live with the BC issues raised. > Introducing all type names as keywords

Re: [PHP-DEV] Calling a class constructor

2008-04-30 Thread Sam Barrow
On Wed, 2008-04-30 at 19:09 +0200, Hannes Magnusson wrote: > On Wed, Apr 30, 2008 at 6:57 PM, Sam Barrow <[EMAIL PROTECTED]> wrote: > > create_new(string $class, array $constructor_args) > > > > Does anyone else see a need for this? > > No. > Have you consid

Re: [PHP-DEV] Re: RE : [PHP-DEV] Return type hinting patch

2008-04-30 Thread Sam Barrow
On Wed, 2008-04-30 at 09:26 -0700, Chris Stockton wrote: > Hello Sam. > > Would you agree in general the function int name() { syntax is > favored? If you need help working out the grammar for such changes let > me know. This is something that I think would add value to PHP as a &g

Re: [PHP-DEV] Calling a class constructor

2008-04-30 Thread Sam Barrow
On Wed, 2008-04-30 at 10:03 -0700, Stanislav Malyshev wrote: > Hi! > > > create_new(string $class, array $constructor_args) > > You can create new object via ReflectionClass::newInstance. Still, that just seems unnecessary, I usually compile without the reflection stuff because i never use it. I

[PHP-DEV] Calling a class constructor

2008-04-30 Thread Sam Barrow
Currently there is no way to call a class constructor using call_user_func or something similar, the only way is to use a reflection object which is useless overhead and takes a few lines of code. This would be very useful to be able to do create_new(string $class, array $constructor_args) Does

[PHP-DEV] Re: RE : [PHP-DEV] Return type hinting patch

2008-04-30 Thread Sam Barrow
On Wed, 2008-04-30 at 12:58 +0200, LAUPRETRE François (P) wrote: > > From: Stanislav Malyshev [mailto:[EMAIL PROTECTED] > > > First is that function > > definition and code is usually written by the same person in the same > > (very small) context, and this person has to be somewhat > > absent

Re: [PHP-DEV] Return type hinting patch

2008-04-30 Thread Sam Barrow
l not be used a lot. Work with objects with methods returning an object > > of some kind, then you can do > > > > $object->method()->method2()->method3(); > > > > P.S. I think this thread should be merged with function param type hinting > > because they c

Re: [PHP-DEV] Return type hinting patch

2008-04-30 Thread Sam Barrow
On Wed, 2008-04-30 at 09:23 +0300, Arvids Godjuks wrote: > I'm +1 for this syntax > > function int myfunction(int $param) > { > return $someint; > } > > C/C++ like, easy to understand > > > And bad idea about making a return type "function" - looks very > useless and will not be used a lot

Re: [PHP-DEV] Return type hinting patch

2008-04-30 Thread Sam Barrow
On Tue, 2008-04-29 at 22:13 -0400, Jessie Hernandez wrote: > Sam Barrow wrote: > > Well in summation I think this is something that should be implemented, > > I don't see any arguments against implementing this atleast for arrays > > and classes, like we already ha

Re: [PHP-DEV] Return type hinting patch

2008-04-29 Thread Sam Barrow
id number 1 is the most likely. > > David > > > > > > Am 29.04.2008 um 17:22 schrieb Sam Barrow: > > > > > Well in summation I think this is something that should be > > implemented, > > I don't see any arguments against implementing this atlea

Re: [PHP-DEV] Inheritance/compatibility behavior

2008-04-29 Thread Sam Barrow
On Tue, 2008-04-29 at 17:43 +0200, Stefan Walk wrote: > On Tuesday 29 April 2008 15:34:07 Sam Barrow wrote: > > > This will not work, I get an error that the two must be compatible. > > Wouldn't it be a good idea to allow any type hint for a parameter that > >

Re: [PHP-DEV] Return type hinting patch

2008-04-29 Thread Sam Barrow
00, Pierre Joye wrote: > On Tue, Apr 29, 2008 at 5:22 PM, Sam Barrow <[EMAIL PROTECTED]> wrote: > > > > Well in summation I think this is something that should be implemented, > > I don't see any arguments against implementing this atleast for arrays > >

Re: [PHP-DEV] Return type hinting patch

2008-04-29 Thread Sam Barrow
Well in summation I think this is something that should be implemented, I don't see any arguments against implementing this atleast for arrays and classes, like we already have for function parameters. The only thing left would be to decide on the syntax public array function x() { // Probably t

Re: [PHP-DEV] Inheritance/compatibility behavior

2008-04-29 Thread Sam Barrow
On Tue, 2008-04-29 at 09:34 -0400, Sam Barrow wrote: > I want to make two classes: > > abstract class a { > abstract public function go($a); > } > final class b extends a { > abstract public function go(array $a); > } > Sorry, function in class b should no

[PHP-DEV] Inheritance/compatibility behavior

2008-04-29 Thread Sam Barrow
I want to make two classes: abstract class a { abstract public function go($a); } final class b extends a { abstract public function go(array $a); } This will not work, I get an error that the two must be compatible. Wouldn't it be a good idea to allow any type hint for a paramet

Re: [PHP-DEV] Return type hinting patch

2008-04-26 Thread Sam Barrow
I like the first too, if this can be implemented I think it is a suitable syntax. On Sat, 2008-04-26 at 00:13 +0100, Alain Williams wrote: > public function int doThing(string $foo) { return 1; } > > The above is the best (ie omit 'return' or 'returns'). > > This also is consistent with C and wi

Re: [PHP-DEV] Return type hinting patch

2008-04-25 Thread Sam Barrow
5, 2008 at 12:25 PM, Sam Barrow <[EMAIL PROTECTED]> > wrote: > > On Fri, 2008-04-25 at 13:24 -0600, Nathan Nobbe wrote: > > On Fri, Apr 25, 2008 at 1:15 PM, Sam Barrow > <[EMAIL PROTECTED]> wrote: > >

Re: [PHP-DEV] Return type hinting patch

2008-04-25 Thread Sam Barrow
On Fri, 2008-04-25 at 13:24 -0600, Nathan Nobbe wrote: > On Fri, Apr 25, 2008 at 1:15 PM, Sam Barrow <[EMAIL PROTECTED]> wrote: > On Fri, 2008-04-25 at 14:08 -0500, Jeremy Privett wrote: > > Sam Barrow wrote: > > > I figured it out, t

Re: [PHP-DEV] Return type hinting patch

2008-04-25 Thread Sam Barrow
On Fri, 2008-04-25 at 14:08 -0500, Jeremy Privett wrote: > Sam Barrow wrote: > > I figured it out, the syntax is now as follows: > > > > function a($b, $c) returns d { > > } > > > > I'll post an update soon. > > > > > > > > T

Re: [PHP-DEV] Return type hinting patch

2008-04-25 Thread Sam Barrow
I figured it out, the syntax is now as follows: function a($b, $c) returns d { } I'll post an update soon. -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Return type hinting patch

2008-04-25 Thread Sam Barrow
> Why note the following (which would be more C like): > > function return int a($arg1, $arg2) { > } > > It gets a little long when you're using classes abstract protected function return int dostuff() { } vs abstract protected function dostuff() return int { } -- PHP Inter

Re: [PHP-DEV] Return type hinting patch

2008-04-25 Thread Sam Barrow
On Fri, 2008-04-25 at 10:06 -0700, Stanislav Malyshev wrote: > I notice it introduces new keyword - > returns. Is it necessary? Each new keyword means broken code. > I have adapted the patch to reuse the "return" keyword. -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe

Re: [PHP-DEV] Return type hinting patch

2008-04-25 Thread Sam Barrow
ble? What I'm trying to acheive is this: function a($arg1, $arg2) return int { } Currently: function a return int($arg1, $arg2) { } On Fri, 2008-04-25 at 11:30 -0400, Sam Barrow wrote: > Attached is my return type hinting patch. It allows type hinting for > parameters and return values

Re: [PHP-DEV] Return type hinting patch

2008-04-25 Thread Sam Barrow
On Fri, 2008-04-25 at 10:06 -0700, Stanislav Malyshev wrote: > Hi! > > In general, it'd be very nice to have some definition of the proposed > feature beyond the patch. It would probably answer some of my questions > that follow :) > > > parameters and return values. Objects with __toString met

[PHP-DEV] Return type hinting patch

2008-04-25 Thread Sam Barrow
Attached is my return type hinting patch. It allows type hinting for parameters and return values. Int, float, bool, string, num, scalar, resource, object, array, and class names are supported for both parameters and return values. Objects with __toString methods are allowed to pass for scalar and

Re: [PHP-DEV] Object instantiation

2008-04-18 Thread Sam Barrow
On Fri, 2008-04-18 at 11:42 -0700, Stanislav Malyshev wrote: > Hi! > > > $result = new myObject -> myMethod(); > > > > Is there a technical reason as to why this can't be done? If not can > > this be changed? > > I think this can not be parsed unambiguously. This could be new > (expression with

Re: [PHP-DEV] Array access on function returns

2008-04-18 Thread Sam Barrow
On Fri, 2008-04-18 at 10:40 -0700, Kalle Sommer Nielsen wrote: > Hey Internals > > I've been wondering for quite some time why PHP doesn't allow you to access > arrays when you assign it to a value like in Javascript: > > function ArrayTest(Array $range) > { > return($range); > } > > $rang

[PHP-DEV] Object instantiation

2008-04-18 Thread Sam Barrow
I had a question about object instantiation. You can do this: function createObject() { return new myObject; } $result = createObject() -> myMethod(); But you can't do this: $result = new myObject -> myMethod(); Is there a technical reaosn as to why this can't be done? If not can this

Re: [PHP-DEV] [RFC] Type hints (parameter and return value)

2008-04-18 Thread Sam Barrow
On Fri, 2008-04-18 at 12:33 +0100, Richard Quadling wrote: > On 18/04/2008, Arvids Godjuks <[EMAIL PROTECTED]> wrote: > > +1 for strict types. > > > > That way it will be simple: > > * Don't need - then don't use at all > > * You need it - you use it fully. > > > > One thing than left to clearf

Re: [PHP-DEV] [RFC] Strict type hints (parameter and return value)

2008-04-17 Thread Sam Barrow
On Thu, 2008-04-17 at 11:43 -0700, Stanislav Malyshev wrote: > Hi! > > > Scalar is useful if you DON'T want an array or object - but don't care > > if you get an int/string/whatnot > > When you can use string but not object with __toString? my patch does that > -- > Stanislav Malyshev, Zend So

Re: [PHP-DEV] [RFC] Strict type hints (parameter and return value)

2008-04-17 Thread Sam Barrow
On Thu, 2008-04-17 at 10:23 -0700, Chris Stockton wrote: > On Thu, Apr 17, 2008 at 10:11 AM, Sam Barrow <[EMAIL PROTECTED]> > wrote: > Actually, is_numeric checks for strings that contain numeric > values, > it's not the same as is_bool, is

Re: [PHP-DEV] [RFC] Type hints (parameter and return value)

2008-04-17 Thread Sam Barrow
On Thu, 2008-04-17 at 10:06 -0700, Stanislav Malyshev wrote: > Hi! > > > The problem with this is that there's not much point in converting the > > value. PHP will do that anyway, making this kind of pointless. > > There would be a point since PHP might convert to different type that > you inten

Re: [PHP-DEV] [RFC] Strict type hints (parameter and return value)

2008-04-17 Thread Sam Barrow
On Thu, 2008-04-17 at 10:06 -0700, Chris Stockton wrote: > On Thu, Apr 17, 2008 at 9:57 AM, Stanislav Malyshev <[EMAIL PROTECTED]> wrote: > > > What's the use of such code? If $var is '1' and not 1, what's the use of > > throwing an exception and having to handle it later (basically by failing > >

Re: [PHP-DEV] Re: [RFC] Strict type hints (parameter and return value)

2008-04-17 Thread Sam Barrow
On Thu, 2008-04-17 at 08:54 -0700, Chris Stockton wrote: > I like this patch, it adds a feature which a lot of companies and code base > would surely implement without breaking anything. The only thing I do not > like has already been mentioned, numeric and scalar are not included. > > The one thi

Re: [PHP-DEV] Re: [RFC] Strict type hints (parameter and return value)

2008-04-17 Thread Sam Barrow
On Thu, 2008-04-17 at 09:18 -0700, Chris Stockton wrote: > On Thu, Apr 17, 2008 at 9:01 AM, Sam Barrow <[EMAIL PROTECTED]> wrote: > > > I like this alot better too, the only downside is compatibility > > problems. > > > Can you explain, I understand; in partial

Re: [PHP-DEV] [RFC] Strict type hints (parameter and return value)

2008-04-17 Thread Sam Barrow
On Thu, 2008-04-17 at 17:29 +0200, Paul Biggar wrote: > On Thu, Apr 17, 2008 at 5:24 PM, Felipe Pena <[EMAIL PROTECTED]> wrote: > > > Thanks for making the change. This is much more consistent. It remains > > > that there is no 'scalar' or 'numeric' hint. Are you planning on > > > including them

Re: [PHP-DEV] [RFC] Strict type hints (parameter and return value)

2008-04-17 Thread Sam Barrow
In this case, I'd suggest using my patch for parameter type hinting. It utilizes the current type hinting system for minimal code changes, whereas this is a whole new set of functionality. It also has scalar and number types, and supports objects with __tostring methods. On Thu, 2008-04-17 at 11:4

Re: [PHP-DEV] [RFC] Type hints (parameter and return value)

2008-04-17 Thread Sam Barrow
On Thu, 2008-04-17 at 14:52 +0200, Paul Biggar wrote: > Hi, > > Your current implementation seems to be inconsistent with both itself > and the rest of PHP. I hope this can be rectified before it is > included. PHP is inconsisent enough without adding more. > > > 1.) There are a number of is_* f

Re: [PHP-DEV] Return type hints

2008-04-14 Thread Sam Barrow
If somebody does have a patch for this or is working on one let me know. Whether this will be implemented or not I would like to assist with this patch so I can use it for personal use at the very least. -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www

Re: [PHP-DEV] Return type hints

2008-04-07 Thread Sam Barrow
I have a scalar type hinting patch on my blog at www.sambarrow.com On Mon, 2008-04-07 at 10:57 -0300, Felipe Pena wrote: > > I don't thought this before! > Sure, i'll try provide a patch. -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.p

Re: [PHP-DEV] Re: [PATCH] Allow unsetting headers previously set by header()

2008-03-30 Thread Sam Barrow
On Sun, 2008-03-30 at 16:05 -0400, Edward Z. Yang wrote: > Christian Schmidt wrote: > > What do you think of the general idea of being able to unset > headers? > > And what do you think of my patch? > > If you need this kind of flexibility, I recommend you make an > HttpHeaders class which manages

[PHP-DEV] Type hinting question

2008-03-28 Thread Sam Barrow
Not bringing the issue back up on the list, I was just wondering if there is a supporter of type hinting that would be willing to help me implement an automatic conversion of objects with a __tostring() method to strings if the object was passed as an argument with a string type hint. -- PHP In

Re: [PHP-DEV] get_magic_quotes_gpc, get-magic-quotes-runtime in head, get a "final" decision

2008-02-08 Thread Sam Barrow
On Fri, 2008-02-08 at 10:42 -0600, Brian Moon wrote: > Richard Quadling wrote: > > Aren't some things just worth the BC break? > > > > Having never used them, I can quite happily say bomb the bastards! > > Agreed. For Phorum will just change our code from: > > if ( get_magic_quotes_gpc() ) { >

Re: [PHP-DEV] get_magic_quotes_gpc, get-magic-quotes-runtime in head, get a "final" decision

2008-02-08 Thread Sam Barrow
On Fri, 2008-02-08 at 13:48 +0100, Pierre Joye wrote: > On Feb 8, 2008 1:26 PM, Tomas Kuliavas <[EMAIL PROTECTED]> wrote: > > >> So I guess I'm -1: Restore them, always return false, and throw > > >> E_DEPRECATED. > > > > > > But this was about them being in PHP 6, not PHP 5.. > > > If magic_quotes

Re: [PHP-DEV] _REQUEST and variable_order

2008-02-07 Thread Sam Barrow
On Thu, 2008-02-07 at 02:17 -0800, Rasmus Lerdorf wrote: > Jani Taskinen wrote: > > On Thu, 2008-02-07 at 01:43 -0800, Rasmus Lerdorf wrote: > >> Jani Taskinen wrote: > >>> On Wed, 2008-02-06 at 20:27 -0800, Rasmus Lerdorf wrote: > Stanislav Malyshev wrote: > > The proposal(s): > > 1.

Re: [PHP-DEV] _REQUEST and variable_order

2008-02-06 Thread Sam Barrow
On Wed, 2008-02-06 at 20:27 -0800, Rasmus Lerdorf wrote: > Stanislav Malyshev wrote: > > Hi! > > > > This topic was already discussed here but never arrived to a conclusion, > > so I will raise it again. > > The Problem: > > We have $_REQUEST superglobal, which is often used to abstract GET/POST

Re: [PHP-DEV] _REQUEST and variable_order

2008-02-06 Thread Sam Barrow
On Wed, 2008-02-06 at 16:39 -0800, Stanislav Malyshev wrote: > Hi! > > This topic was already discussed here but never arrived to a conclusion, > so I will raise it again. > The Problem: > We have $_REQUEST superglobal, which is often used to abstract GET/POST > requests. However, in most cases

Re: [PHP-DEV] type hinting

2008-02-06 Thread Sam Barrow
On Wed, 2008-02-06 at 10:09 -0500, Elizabeth M Smith wrote: > Wow, you guys sure are a bit harsh > > Here's the problem - there's a group of people who really want true (I > might say "javaish") type-hints for scalar values - int, bool, string, > float, and won't settle for anything less. >

Re: [PHP-DEV] type hinting

2008-02-06 Thread Sam Barrow
On Wed, 2008-02-06 at 15:31 +0100, Pierre Joye wrote: > HI Sam, > > On Feb 6, 2008 2:33 PM, Sam Barrow <[EMAIL PROTECTED]> wrote: > > On Wed, 2008-02-06 at 14:20 +0100, Derick Rethans wrote: > > > On Wed, 6 Feb 2008, Sam Barrow wrote: > > > > >

Re: [PHP-DEV] type hinting

2008-02-06 Thread Sam Barrow
a hack is my opinion. Why is a scalar type hint not acceptable if an array type hint is? That's what I really want to know. > -Chris > > On Feb 6, 2008 6:20 AM, Derick Rethans <[EMAIL PROTECTED]> wrote: > > On Wed, 6 Feb 2008, Sam Barrow wrote: > > > > > On

Re: [PHP-DEV] type hinting

2008-02-06 Thread Sam Barrow
On Wed, 2008-02-06 at 14:20 +0100, Derick Rethans wrote: > On Wed, 6 Feb 2008, Sam Barrow wrote: > > > On Wed, 2008-02-06 at 09:31 +0100, Derick Rethans wrote: > > > > > > I still we should add simple static typehints (ie. just the types that > > > we use

Re: [PHP-DEV] type hinting

2008-02-06 Thread Sam Barrow
On Wed, 2008-02-06 at 09:31 +0100, Derick Rethans wrote: > On Wed, 6 Feb 2008, Steph Fox wrote: > > > > As with so many topics on this list, I have no authority to influence > > > the outcome. I personally think they've all got rules to instantly > > > delete my email (but that's cause I'm paranoi

Re: [PHP-DEV] type hinting

2008-02-05 Thread Sam Barrow
use there isn't a way to answer that point. Anyone who does > > would > > be laughed out of the barn. Like I told Sam just few minutes ago, the fact > > is > > that no matter how wonderful PHP's juggling is, there is still a reason why > > we have diffe

Re: [PHP-DEV] type hinting

2008-02-05 Thread Sam Barrow
> > > problem. > > Probably because there isn't a way to answer that point. Anyone who does > > would > > be laughed out of the barn. Like I told Sam just few minutes ago, the fact > > is > > that no matter how wonderful PHP's juggling is, there is st

Re: [PHP-DEV] type hinting

2008-02-05 Thread Sam Barrow
. Anyone who does > would > be laughed out of the barn. Like I told Sam just few minutes ago, the fact is > that no matter how wonderful PHP's juggling is, there is still a reason why > we have different data types. If it was all the same we wouldn't need > intege

Re: [PHP-DEV] ifsetor like expression in php6

2008-01-26 Thread Sam Barrow
On Sat, 2008-01-26 at 22:13 +0100, Lars Strojny wrote: > Hi, > > Am Samstag, den 26.01.2008, 12:17 -0500 schrieb Sam Barrow: > > I don't think throwing a E_NOTICE is appropriate. The isset() construct > > doesn't throw an E_NOTICE, this shouldn't either. >

Re: [PHP-DEV] ifsetor like expression in php6

2008-01-26 Thread Sam Barrow
I'm sorry I misunderstood. If specifying like "$var ?: 5" then it should throw an E_NOTICE, as this is a conditional that checks the value of a variable ($var). Sebastian, for assigning of a default value is a variable is not set, I would recommend using something like this (this is what I use):

Re: [PHP-DEV] ifsetor like expression in php6

2008-01-26 Thread Sam Barrow
I don't think throwing a E_NOTICE is appropriate. The isset() construct doesn't throw an E_NOTICE, this shouldn't either. On Sat, 2008-01-26 at 17:30 +0100, Sebastian wrote: > hi, > > i just found the new ifsetor like construction in php6. It left me the > question why php has to throw an E_NOTI

[PHP-DEV] Tar archives

2008-01-23 Thread Sam Barrow
PHP has ZIP, GZip, and BZ2 support, but nothing for tar archives. Is anyone interested in working on a tar extension? -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] SUMMARY: Array syntax

2008-01-14 Thread Sam Barrow
On Sat, 2008-01-12 at 00:52 +0300, Antony Dovgal wrote: > On 11.01.2008 22:13, Sam Barrow wrote: > >> input from many people is great, moreover - it is necessary. However, it > >> is not the same as deciding by arithmetical majority of votes of whoever > >> cares

Re: [PHP-DEV] SUMMARY: Array syntax

2008-01-11 Thread Sam Barrow
On Fri, 2008-01-11 at 11:07 -0800, Stanislav Malyshev wrote: > > It is better to have input from people with a wide range of experience > > levels, it results in a fairer vote that actually represents the > > population, rather than putting PHP under the control of a select few. > > No, it is not.

Re: [PHP-DEV] SUMMARY: Array syntax

2008-01-11 Thread Sam Barrow
On Fri, 2008-01-11 at 14:06 -0500, Olivier Hill wrote: > On Jan 11, 2008 1:47 PM, Sam Barrow <[EMAIL PROTECTED]> wrote: > > > > True. No one's vote is worth more than anyone else's, everybody should > > have equal say. Some people may know more about the P

Re: [PHP-DEV] SUMMARY: Array syntax

2008-01-11 Thread Sam Barrow
On Fri, 2008-01-11 at 19:27 +0100, Pierre wrote: > On Jan 11, 2008 7:24 PM, Johannes Schlüter <[EMAIL PROTECTED]> wrote: > > > But well in my results I have a problem: For Rasmus's vote I've counted > > a -1 while "as such this syntax is appropriate I think" has to be > > counted as +1. > > There

Re: [PHP-DEV] Array syntax []

2008-01-11 Thread Sam Barrow
+1 -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Array syntax []

2008-01-11 Thread Sam Barrow
On Fri, 2008-01-11 at 10:05 +0200, Lokrain wrote: > Hello mr. Antonio Touriño, > > So as if I understand, you want to change the syntax of array() keyword. > Will you mind to update the changes in all php scripts in the world too? > > PS. You can always have your [] in custom patch, but I do not

Re: [PHP-DEV] [RFC] Square brackets shortcut

2008-01-10 Thread Sam Barrow
On Thu, 2008-01-10 at 14:56 +0100, Hannes Magnusson wrote: > So you reject scalar type hinting because it isn't type casting and > can therefor confuses newbies - but scattering seemingly random > brackets around your code (to safe 5 key strokes) is obvious to users? > > Noone would confuse this w

Re: [PHP-DEV] [RFC] Square brackets shortcut

2008-01-10 Thread Sam Barrow
I just tried this out using option b, and I really like it. $var = [1, 6, 434] ; I think it looks good and helps code readability alot. On Thu, 2008-01-10 at 19:07 +0900, Ryusuke SEKIYAMA wrote: > Hello, lists, > > I'm tired to type "array()" many times. And I want to > declare arrays more easi

Re: [PHP-DEV] [RFC] Square brackets shortcut

2008-01-10 Thread Sam Barrow
On Thu, 2008-01-10 at 16:18 +0200, Giedrius D wrote: > Hi, > > On Jan 10, 2008 3:56 PM, Hannes Magnusson <[EMAIL PROTECTED]> wrote: > > So you reject scalar type hinting because it isn't type casting and > > can therefor confuses newbies - but scattering seemingly random > > brackets around your c

Re: [PHP-DEV] [RFC] Square brackets shortcut

2008-01-10 Thread Sam Barrow
I like b. On Thu, 2008-01-10 at 19:07 +0900, Ryusuke SEKIYAMA wrote: > Hello, lists, > > I'm tired to type "array()" many times. And I want to > declare arrays more easily. So I wrote the patch for > zend_language_parser.y which enables to declare arrays > with square brackets like some other lan

  1   2   3   >