Re: [PHP-DEV] Exceptions instead of Fatal Error when calling non existent method?

2007-12-31 Thread Alain Williams
E_ERROR with a user defined function using set_error_handler() I can't see anyway to accomplish this in the current implementation? What is wrong with __call() ? See: http://www.php.net/manual/en/language.oop5.overloading.php -- Alain Williams Linux Consultant - Mail systems, Web

Re: [PHP-DEV] RE: Optional scalar type hinting

2008-01-03 Thread Alain Williams
(eg string - integer) when the function is called; it then need not be converted again when it is used in the function. This will presumably be a win if the value is used more than once. -- Alain Williams Linux Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer. +44 (0) 787

Re: [PHP-DEV] RE: Optional scalar type hinting

2008-01-03 Thread Alain Williams
);// Perform check and then silent juggle $total = SumToN(10); // Perform check but juggle not needed $total = SumToN(ten); // Perform check and emit an error (somehow) The error is better emitted at the point of function call rather than having to put a check within SumToN() -- Alain

Re: [PHP-DEV] RE: Optional scalar type hinting

2008-01-03 Thread Alain Williams
On Thu, Jan 03, 2008 at 07:36:48PM +0100, Markus Fischer wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello, Alain Williams wrote: On Thu, Jan 03, 2008 at 12:21:21PM -0500, Sam Barrow wrote: I think E_WARNING would be appropriate. That's what happens when you omit an argument

Re: [PHP-DEV] RE: Optional scalar type hinting

2008-01-03 Thread Alain Williams
will still happen. What you are doing to allowing the function author to protect the integrity of his code without having to resort to a regex/... to check what the arguments are. -- Alain Williams Linux Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer. +44 (0) 787 668

Re: [PHP-DEV] RE: Optional scalar type hinting

2008-01-03 Thread Alain Williams
(presumably as a number) then the type juggle 'string of digits - number' will not need to be done since it was done on function entry. -- Alain Williams Linux Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer. +44 (0) 787 668 0256 http://www.phcomp.co.uk/ Parliament Hill

Re: [PHP-DEV] type hinting

2008-01-04 Thread Alain Williams
is NOT to save input ($_GET, etc) validation -- that will still need to be done; the point is to help pick up programming errors where you accidentally get the type wrong. Granted: some idiots will use it as cheap input validation, but it is difficult to help some people. -- Alain Williams Linux

Re: [PHP-DEV] type hinting

2008-01-04 Thread Alain Williams
a defined capitalisation. Just an off the wall thought ... if the type is not a known scalar type or class, then check to see if the word is a constant ... could be interesting aka C's typedefs. -- Alain Williams Linux Consultant - Mail systems, Web sites, Networking, Programmer

Re: [PHP-DEV] type hinting

2008-01-04 Thread Alain Williams
. -- ... SwarmBuy.com - http://www.swarmbuy.com Leveraging the buying power of the masses! ... -- Alain Williams Linux Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer. +44 (0) 787 668 0256 http

Re: [PHP-DEV] type hinting

2008-01-04 Thread Alain Williams
is that the programmer will pass an int/float/string/... rather than the wrong resource type. 'resource' will still be very useful and catch many errors without being 100% perfect. -- Alain Williams Linux Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer. +44 (0) 787 668 0256 http

Re: [PHP-DEV] type hinting

2008-01-05 Thread Alain Williams
this means is that the function is written in the assumption that $_REQUEST['age'] has been checked for numeric before the function is called. -- Alain Williams Linux Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer. +44 (0) 787 668 0256 http://www.phcomp.co.uk

Re: [PHP-DEV] U

2008-01-05 Thread Alain Williams
will be performed) OK And well... This thread continues without a single valid (!= personal opinion) reason why type hinting should NOT be introduced. BTW accepting the string '1' where an (int) type hint is placed would be the next stupid design decision. Why ? -- Alain Williams Linux

Re: [PHP-DEV] U

2008-01-05 Thread Alain Williams
3.7645990848541 There is thus considerable advantage on doing the type juggling as part of the type hinting on function call. -- Alain Williams Linux Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer. +44 (0) 787 668 0256 http://www.phcomp.co.uk/ Parliament Hill Computers

Re: [PHP-DEV] Type hinting misunderstood

2008-01-06 Thread Alain Williams
is still allowed, so PDO returning results as strings is quite OK as long as what is defined to be numeric *really* has a VALUE that is a number. OK: the above does not apply with some things like resources since you can't convert them to/from a string in a meaninful way. -- Alain Williams Linux

Re: [PHP-DEV] Type hinting misunderstood

2008-01-06 Thread Alain Williams
On Sun, Jan 06, 2008 at 12:51:20PM +0100, Kore Nordmann wrote: Am Sonntag, den 06.01.2008, 11:28 + schrieb Alain Williams: PLEASE READ CAREFULLY You have NOT understood what type hinting is about. You are confusing the TYPE and the VALUE. What type hinting means

Re: [PHP-DEV] Type hinting misunderstood

2008-01-06 Thread Alain Williams
we continue going round in circles. Stefan Esser -- Alain Williams Linux Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer. +44 (0) 787 668 0256 http://www.phcomp.co.uk/ Parliament Hill Computers Ltd. Registration Information: http://www.phcomp.co.uk/contact.php

Re: [PHP-DEV] type hinting

2008-01-06 Thread Alain Williams
. +1 -- Alain Williams Linux Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer. +44 (0) 787 668 0256 http://www.phcomp.co.uk/ Parliament Hill Computers Ltd. Registration Information: http://www.phcomp.co.uk/contact.php Chairman of UKUUG: http://www.ukuug.org/ #include

Re: [PHP-DEV] type hinting

2008-01-06 Thread Alain Williams
and prob do something stupid like putting a zero in some database column, or worse. -- Alain Williams Linux Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer. +44 (0) 787 668 0256 http://www.phcomp.co.uk/ Parliament Hill Computers Ltd. Registration Information: http

Re: [PHP-DEV] U

2008-01-17 Thread Alain Williams
is propagated via _GET/_POST. However: I am quite willing to accept the argument that the trivial amount of extra code to do this properly is the 'right' solution. What Stefan is saying ought to be listed with the security issues on the PHP web site. -- Alain Williams Linux Consultant - Mail systems

Re: [PHP-DEV] type hinting

2008-02-06 Thread Alain Williams
. But you are assuming that you can identify the 'right' places to put the checks ... not always easy, especially in code that changes. -- Alain Williams Linux Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer. +44 (0) 787 668 0256 http://www.phcomp.co.uk/ Parliament Hill

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

2008-04-17 Thread Alain Williams
it. An: assert (is_int($x)) followed by: $x = (int)$x is the way to go. This only serves to include an additional type juggling system into php, which is very confusing. If you don't understand it: don't use it. -- Alain Williams Linux Consultant - Mail systems, Web sites

Re: [PHP-DEV] Return type hinting patch

2008-04-25 Thread Alain Williams
possible? What I'm trying to acheive is this: function a($arg1, $arg2) return int { } Currently: function a return int($arg1, $arg2) { } Why note the following (which would be more C like): function return int a($arg1, $arg2) { } -- Alain Williams Linux Consultant - Mail

Re: [PHP-DEV] Return type hinting patch

2008-04-27 Thread Alain Williams
() { global $aa; echo in b aa=$aa\n; } b(); } a('this is aa'); -- Alain Williams Linux Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer. +44 (0) 787 668 0256 http://www.phcomp.co.uk/ Parliament Hill Computers Ltd. Registration Information: http

Re: [PHP-DEV] Return type hinting patch

2008-04-30 Thread Alain Williams
him for his hard work. -- Alain Williams Linux Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer. +44 (0) 787 668 0256 http://www.phcomp.co.uk/ Parliament Hill Computers Ltd. Registration Information: http://www.phcomp.co.uk/contact.php Chairman of UKUUG: http

Re: [PHP-DEV] Return type hinting patch

2008-04-30 Thread Alain Williams
On Wed, Apr 30, 2008 at 10:42:04PM +0200, Keryx Web wrote: Alain Williams skrev: Taking it a bit further, if the function returns a reference (eg to its argument): function int myfunction(int $param) Alternative could be: function int myfunction(int $param) But I think

Re: [PHP-DEV] Float comparison

2008-05-02 Thread Alain Williams
think that it realy helps since the naive programmer isn't going to have a clue about choosing a good value for EPSILON. Best leave it the way that it is. -- Alain Williams Linux Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer. +44 (0) 787 668 0256 http

Re: [PHP-DEV] Float comparison

2008-05-03 Thread Alain Williams
to be money::plus() Would this fit well with the PHP type juggling. Why not use the BC Math Functions ? -- Alain Williams Linux Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer. +44 (0) 787 668 0256 http://www.phcomp.co.uk/ Parliament Hill Computers Ltd. Registration Information

Re: [PHP-DEV] Alternative to multiple namespaces per file

2008-05-31 Thread Alain Williams
compile their classes together for performance, they will never be able to switch to, or support namespaces). ... To which I would add: namespaces are not for variables, this I would like to see. -- Alain Williams Linux Consultant - Mail systems, Web sites, Networking, Programmer

Re: [PHP-DEV] php7- dropping the $ from the variable name - rfc

2008-09-18 Thread Alain Williams
that to be a call to a function named 'funref'. So you need to change the syntax to, perhaps, something like C: (funref)() I can't see people understanding that. Stick with what we have. -- Alain Williams Linux Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer. +44 (0) 787

Re: [PHP-DEV] php7- dropping the $ from the variable name - rfc

2008-09-20 Thread Alain Williams
do like the idea of replacing dollar with euro :-) -- Alain Williams Linux Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer. +44 (0) 787 668 0256 http://www.phcomp.co.uk/ Parliament Hill Computers Ltd. Registration Information: http://www.phcomp.co.uk/contact.php

Re: [PHP-DEV] RE: /endnamespacediscussion

2008-10-27 Thread Alain Williams
of variables in namespace foo:.:bar. Maybe $_NAMESPACES would be an array of all namespaces that are defined. -- Alain Williams Linux/GNU Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer. +44 (0) 787 668 0256 http://www.phcomp.co.uk/ Parliament Hill Computers Ltd

Re: [PHP-DEV] Reserved namespaces

2009-01-23 Thread Alain Williams
: use strict; use IO::File Nobody is made to do anything, however you loose the option to complain if your namespace starts with a lower case character. -- Alain Williams Linux/GNU Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer. +44 (0) 787 668 0256 http

Re: [PHP-DEV] Reserved namespaces

2009-01-26 Thread Alain Williams
(think: $_GET). (3) also has the virtue that system things tend to start with an underscore. This scheme is nice and simple. -- Alain Williams Linux/GNU Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer. +44 (0) 787 668 0256 http://www.phcomp.co.uk/ Parliament Hill

Re: [PHP-DEV] RFC: Type hinting revisited for PHP 5.3

2009-07-01 Thread Alain Williams
documentation of this - I am not talking about PHP documentation here by W3 other places :-( +1 to type hinting. -- Alain Williams Linux/GNU Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer. +44 (0) 787 668 0256 http://www.phcomp.co.uk/ Parliament Hill Computers Ltd

Re: [PHP-DEV] RFC: Type hinting revisited for PHP 5.3

2009-07-02 Thread Alain Williams
the current PHP manual that refers to it as type hinting: http://www.php.net/manual/en/language.oop5.typehinting.php -- Alain Williams Linux/GNU Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer. +44 (0) 787 668 0256 http://www.phcomp.co.uk/ Parliament Hill Computers Ltd

Re: [PHP-DEV] RFC: Type hinting revisited for PHP 5.3

2009-07-05 Thread Alain Williams
functions library, as well as the common behavior of PHP. It doesn't come to say that it's not useful in some cases - but for these, using is_*() should be a suitable. -- Alain Williams Linux/GNU Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer. +44 (0) 787 668 0256

Re: [PHP-DEV] Type hinting/casting request for vote

2009-07-09 Thread Alain Williams
throwing the idea in the wild since I am not able to assess if that's doable, but it might be a good idea to add it as soon as possible if it is, especially if we want to skip a 5.4 -- Alain Williams Linux/GNU Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer. +44 (0) 787 668

Re: [PHP-DEV] Type hinting - Request for Discussion

2009-07-10 Thread Alain Williams
); } ... } 3) function Foo(is_int($x)) { Function is_int is called, an error is raised if it returns false. -- Alain Williams Linux/GNU Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer. +44 (0) 787 668 0256 http

Re: [PHP-DEV] Type hinting - Request for Discussion

2009-07-10 Thread Alain Williams
weak and strict, numeric and scalar type hiting seems to be a very good middle point. +1 for Strict type hiting. (weak type hiting very similar to no type hiting). -- Alain Williams Linux/GNU Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer. +44 (0) 787 668

Re: [PHP-DEV] Type hinting - Request for Discussion

2009-07-10 Thread Alain Williams
$length) { ... } I suspect that it makes things too complicated. -- Alain Williams Linux/GNU Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer. +44 (0) 787 668 0256 http://www.phcomp.co.uk/ Parliament Hill Computers Ltd. Registration Information: http://www.phcomp.co.uk

Re: [PHP-DEV] Type hinting - Request for Discussion

2009-07-10 Thread Alain Williams
On Fri, Jul 10, 2009 at 10:57:22AM -0400, Alban wrote: Le Fri, 10 Jul 2009 14:23:24 +0100, Alain Williams a écrit : On Fri, Jul 10, 2009 at 08:45:55AM -0400, Alban wrote: Hello all, I don't understand why you focus on Strict / Weak question. It is really about: * type

Re: [PHP-DEV] Type hinting - Request for Discussion

2009-07-10 Thread Alain Williams
On Fri, Jul 10, 2009 at 11:50:04AM -0400, Alban wrote: Le Fri, 10 Jul 2009 16:16:51 +0100, Alain Williams a écrit : The GET argument, yes, should be an integer, but it's possible is not ! In this, actually i always use this syntaxe : is_child(intval($_GET['age'])); or is_child( (int

Re: Fwd: [PHP-DEV] Type hinting - Request for Discussion

2009-07-10 Thread Alain Williams
be good for things like generating a WSDL file... which currently works by parsing pseudo comments in the source. -- Alain Williams Linux/GNU Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer. +44 (0) 787 668 0256 http://www.phcomp.co.uk/ Parliament Hill Computers Ltd

Re: [PHP-DEV] Design of the Zend Engine's Instruction Set

2009-08-17 Thread Alain Williams
quickly and openly they address bugs. We will still accept you back when you become disillusioned. Regards -- Alain Williams Linux/GNU Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer. +44 (0) 787 668 0256 http://www.phcomp.co.uk/ Parliament Hill Computers Ltd

Re: [PHP-DEV] Detecting share violations over cifs with PHP? Feature request

2009-09-16 Thread Alain Williams
of work, but is only done if the application *really* wants/needs to know. What the function might return could be an array, where different elements contain different levels of details - including the OS specific stuff (some people are not bothered by portablity). I don't know. -- Alain

Re: [PHP-DEV] Autofunc patch (automatically loading functions like autoload)

2009-10-16 Thread Alain Williams
? Yes -- many people do not understand OOP. -- Alain Williams Linux/GNU Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer. +44 (0) 787 668 0256 http://www.phcomp.co.uk/ Parliament Hill Computers Ltd. Registration Information: http://www.phcomp.co.uk/contact.php Past

Re: [PHP-DEV] About optimization

2010-01-13 Thread Alain Williams
than not PHP is not the bottleneck of your program and thus optimization wont get you too much. -- Alain Williams Linux/GNU Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer. +44 (0) 787 668 0256 http://www.phcomp.co.uk/ Parliament Hill Computers Ltd. Registration

Re: [PHP-DEV] About optimization

2010-01-13 Thread Alain Williams
On Wed, Jan 13, 2010 at 07:48:17AM -0800, Rasmus Lerdorf wrote: Alain Williams wrote: Unfortunately: APC does not work with PHP 5.3 -- I have a site where I would love to use it but I cannot. I use APC to great effect elsewhere. The svn version works ok with 5.3. Turn off gc though. You

Re: [PHP-DEV] function call chaining

2010-01-19 Thread Alain Williams
the argument that things like this will confuse novice programmers, maybe: but would they ever try to type something like that ? -- Alain Williams Linux/GNU Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer. +44 (0) 787 668 0256 http://www.phcomp.co.uk/ Parliament Hill

Re: [PHP-DEV] function call chaining

2010-01-19 Thread Alain Williams
()-ork()-ah()-ah() you don't have stray/unwanted variables hanging round to confuse (or be misused) later. -- Alain Williams Linux/GNU Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer. +44 (0) 787 668 0256 http://www.phcomp.co.uk/ Parliament Hill Computers Ltd. Registration

Re: [PHP-DEV] Re: function call chaining

2010-01-20 Thread Alain Williams
); this could be simplified to: $employees-findEmployee('John Smith')-increaseSalary(1000); This is the sort of reason why chaining is useful. It is also, IMHO, quite readable. Regards -- Alain Williams Linux/GNU Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer. +44 (0

Re: [PHP-DEV] [SPAM] Re: [PHP-DEV] Syntactic improvement to array

2007-02-06 Thread Alain Williams
that the [] is easier/quicker to read than array(), but is it really worth it ... too many syntaxes for the same thing ? Anyway: it makes php look like perl -- and that would never do :-) -- Alain Williams Linux Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer. +44 (0) 787

Re: [PHP-DEV] [SPAM] Re: [PHP-DEV] Syntactic improvement to array

2007-02-06 Thread Alain Williams
On Tue, Feb 06, 2007 at 04:16:28PM +0100, Christian Schneider wrote: Alain Williams wrote: Anyway: it makes php look like perl -- and that would never do :-) Can we please stop that FUD? (even if it is meant as a joke) No: it was NOT a serious point. What is wrong with the occasional grin

Re: [PHP-DEV] PHP Just-In-Time Compiler

2007-03-07 Thread Alain Williams
could would be needed. intelligent people of this mailing list beat me down, if the case is that I'm wrong. Before thinking about this: try to demonstrate how much we would gain on typical web sites. -- Alain Williams Linux Consultant - Mail systems, Web sites, Networking, Programmer

Re: [PHP-DEV] RIP PHP 4?

2007-07-06 Thread Alain Williams
are allowed)! +1 -- Alain Williams Linux Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer. +44 (0) 787 668 0256 http://www.phcomp.co.uk/ Parliament Hill Computers Ltd. Registration Information: http://www.phcomp.co.uk/contact.php #include std_disclaimer.h -- PHP

Re: [PHP-DEV] RIP PHP 4?

2007-07-06 Thread Alain Williams
. -- Alain Williams Linux Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer. +44 (0) 787 668 0256 http://www.phcomp.co.uk/ Parliament Hill Computers Ltd. Registration Information: http://www.phcomp.co.uk/contact.php #include std_disclaimer.h -- PHP Internals - PHP Runtime

Re: [PHP-DEV] RIP PHP 4?

2007-07-08 Thread Alain Williams
start. http://upload.wikimedia.org/wikipedia/commons/3/3d/Timezones_optimized.png -- Alain Williams Linux Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer. +44 (0) 787 668 0256 http://www.phcomp.co.uk/ Parliament Hill Computers Ltd. Registration Information: http

Re: [PHP-DEV] RIP PHP 4?

2007-07-09 Thread Alain Williams
and to PHP4 I say So long and thanks for all the fish!!! -- Alain Williams Linux Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer. +44 (0) 787 668 0256 http://www.phcomp.co.uk/ Parliament Hill Computers Ltd. Registration Information: http://www.phcomp.co.uk/contact.php

Re: [PHP-DEV] RIP PHP 4?

2007-07-09 Thread Alain Williams
? The trouble is that many PHP scripts dynamically include other files and variables being dynamically typed ... you really need to run the script to see what happens. -- Alain Williams Linux Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer. +44 (0) 787 668 0256 http

Re: [PHP-DEV] RIP PHP 4?

2007-07-10 Thread Alain Williams
that may arise. Security-only releases will also terminate on 2008-08-08. We strongly recommend upgrading your applications to PHP 5. /p -- Alain Williams Linux Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer. +44 (0) 787 668 0256 http://www.phcomp.co.uk

Re: [PHP-DEV] reserved word alert

2007-08-15 Thread Alain Williams
variable/function/... names. -- Alain Williams Linux Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer. +44 (0) 787 668 0256 http://www.phcomp.co.uk/ Parliament Hill Computers Ltd. Registration Information: http://www.phcomp.co.uk/contact.php Chairman of UKUUG: http

Re: [PHP-DEV] Addslashes still recommended for DB input

2007-08-21 Thread Alain Williams
On Tue, Aug 21, 2007 at 04:26:21PM +0100, Stut wrote: As far as I was aware addslashes is inadequate for this purpose. Should this not point people to use database-specific escaping functions rather than addslashes? Yes, even better use placeholders (if the DB API supports it). -- Alain

Re: [PHP-DEV] Re: [PROPOSED] password_hash RFC - Implementing simplified password hashing functions

2012-08-28 Thread Alain Williams
that the returned string is stored in should be. -- Alain Williams Linux/GNU Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer. +44 (0) 787 668 0256 http://www.phcomp.co.uk/ Parliament Hill Computers Ltd. Registration Information: http://www.phcomp.co.uk/contact.php #include

[PHP-DEV] Problem with php_value open_basedir and apache containers

2012-11-16 Thread Alain Williams
system. Regards -- Alain Williams Linux/GNU Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer. +44 (0) 787 668 0256 http://www.phcomp.co.uk/ Parliament Hill Computers Ltd. Registration Information: http://www.phcomp.co.uk/contact.php #include std_disclaimer.h -- PHP

Re: [PHP-DEV] Re: [RFC] Allow trailing comma in function call argument lists

2013-02-20 Thread Alain Williams
and arrays can already have trailing commands Also: many other languages (eg C, Perl) allow a trailing comma in arrays, but not to function arguments. This change would make PHP different from what many programmers might expect. -- Alain Williams Linux/GNU Consultant - Mail systems, Web sites

Re: [PHP-DEV] Allow (...)-foo() expressions not only for `new`

2013-02-26 Thread Alain Williams
, I do agree that it might be a bit confusing. What is disappointing is that I cannot go: ($f = new Foo)-bar(); That does not suffer from a lack of clarity on intent. -- Alain Williams Linux/GNU Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer. +44 (0) 787 668 0256

Re: [PHP-DEV] Ternary operator performance improvements

2011-10-17 Thread Alain Williams
slow compared to an if/else when the operand is an array for example: Is that why the following does not work as I expected: $dbh = $how == 'r' ? ($dbh_r) : ($dbh_w); $dbh is NOT a reference to $dbh_r or $dbh_w. -- Alain Williams Linux/GNU Consultant - Mail systems, Web sites, Networking

Re: [PHP-DEV] Ternary operator performance improvements

2011-10-18 Thread Alain Williams
On Tue, Oct 18, 2011 at 10:09:37PM +0200, Arnaud Le Blanc wrote: Hi, Le Monday 17 October 2011 15:07:30, Alain Williams a écrit : On Fri, Oct 14, 2011 at 08:08:56PM +0200, Arnaud Le Blanc wrote: Hi, I've already posted this patch and it has since been reviewed and improved. I'm

Re: [PHP-DEV] Return Type Hinting for Methods RFC

2011-12-22 Thread Alain Williams
the compiler complain if it sees a variable that has not been declared. In a large program the occasional typeo on variable names does happen, catching them with 'use strict' is great! I have proposed this before and people did not like it. Here is to hopeing for a different sentiment. -- Alain

Re: [PHP-DEV] Return Type Hinting for Methods RFC

2011-12-22 Thread Alain Williams
allowing the class users to not be strict. Just because Java has a feature that you appear to not like, does not mean that others might not want it in some circumstances. -- Alain Williams Linux/GNU Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer. +44 (0) 787 668 0256 http

Re: [PHP-DEV] Return Type Hinting for Methods RFC

2011-12-22 Thread Alain Williams
asking to make type hinting for variable declaration an available option. -- Alain Williams Linux/GNU Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer. +44 (0) 787 668 0256 http://www.phcomp.co.uk/ Parliament Hill Computers Ltd. Registration Information: http

Re: [PHP-DEV] Return Type Hinting for Methods RFC

2011-12-22 Thread Alain Williams
checking completely if it knows everywhere a function (probably a class method) can be called from and knows the types of the arguments that are passed in to it. -- Alain Williams Linux/GNU Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer. +44 (0) 787 668 0256 http

Re: [PHP-DEV] Return Type Hinting for Methods RFC

2011-12-22 Thread Alain Williams
too complicated. -- Alain Williams Linux/GNU Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer. +44 (0) 787 668 0256 http://www.phcomp.co.uk/ Parliament Hill Computers Ltd. Registration Information: http://www.phcomp.co.uk/contact.php #include std_disclaimer.h -- PHP

Re: [PHP-DEV] Scalar Type Intentions

2012-03-01 Thread Alain Williams
is about communication of intent, not just with the computer (compiler) but also with programmers who subsequently read the code. -- Alain Williams Linux/GNU Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer. +44 (0) 787 668 0256 http://www.phcomp.co.uk/ Parliament Hill

Re: [PHP-DEV] Scalar Type Hinting

2012-03-08 Thread Alain Williams
sources has NOT been correctly filtered -- but that should be a rare event and indicative of a bug. -- Alain Williams Linux/GNU Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer. +44 (0) 787 668 0256 http://www.phcomp.co.uk/ Parliament Hill Computers Ltd. Registration

Re: [PHP-DEV] PHP class files without ?php at the top

2012-04-07 Thread Alain Williams
like this numbers should start + -- Alain Williams Linux/GNU Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer. +44 (0) 787 668 0256 http://www.phcomp.co.uk/ Parliament Hill Computers Ltd. Registration Information: http://www.phcomp.co.uk/contact.php #include

Re: [PHP-DEV] PHP class files without ?php at the top

2012-04-07 Thread Alain Williams
that the parser would start out in PHP mode. would you please leave this world in peace? ... You may not agree with his proposal (neither do I) but please remain kind polite to him. He is not trolling. -- Alain Williams Linux/GNU Consultant - Mail systems, Web sites, Networking, Programmer

[PHP-DEV] variable declaration

2006-10-10 Thread Alain Williams
Hi, just trying to canvass support for the ability to enforce declaration of variables as with perl's use strict: http://bugs.php.net/bug.php?id=39091 -- Alain Williams Parliament Hill Computers Ltd. Linux Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer. +44

Re: [PHP-DEV] variable declaration

2006-10-10 Thread Alain Williams
, it won't pick up the following: $fo0 = 'bill'; ... $foo = 'ben'; One is a typeo. On 10-Oct-06, at 2:52 PM, Alain Williams wrote: http://bugs.php.net/bug.php?id=39091 -- Alain Williams Parliament Hill Computers Ltd. Linux Consultant - Mail systems, Web sites

Re: [PHP-DEV] Feature request

2006-11-10 Thread Alain Williams
] http://www.martinfowler.com/bliki/FluentInterface.html -- Alain Williams Parliament Hill Computers Ltd. Linux Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer. +44 (0) 787 668 0256 http://www.phcomp.co.uk/ #include std_disclaimer.h -- PHP Internals - PHP Runtime

Re: [PHP-DEV] Run-time taint support proposal

2006-12-15 Thread Alain Williams
in which values from forms are frequently trusted without checks. Php is easy to write, that is good. Unfortunately this also means that bad/simple/careless programmers can use php ... these are the ones who cause many of the php script errors that cause problems. -- Alain Williams Parliament

Re: [PHP-DEV] Run-time taint support proposal

2006-12-15 Thread Alain Williams
consequences are hard to predict without sample code. It is OFF by default. RegisterGlobals was initially ON by detault since loosing it broke a lot of code. PHP survived that. -- Alain Williams Parliament Hill Computers Ltd. Linux Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer

Re: [PHP-DEV] Run-time taint support proposal

2006-12-19 Thread Alain Williams
a great car mechanic. Your reply is completely out of tune with Wietse's comment. -- Alain Williams Parliament Hill Computers Ltd. Linux Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer. +44 (0) 787 668 0256 http://www.phcomp.co.uk/ #include std_disclaimer.h -- PHP

Re: [PHP-DEV] Run-time taint support proposal

2006-12-19 Thread Alain Williams
filtering, there's certainly a way to warn a user that does it by mistake. That's the target. Very well put/explained. -- Alain Williams Parliament Hill Computers Ltd. Linux Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer. +44 (0) 787 668 0256 http://www.phcomp.co.uk

[PHP-DEV] Comments on PHP security

2007-01-11 Thread Alain Williams
This has just appeared: http://www.theregister.co.uk/2007/01/11/php_apps_security/ -- Alain Williams Linux Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer. +44 (0) 787 668 0256 http://www.phcomp.co.uk/ Parliament Hill Computers Ltd. Registration Information

Re: [PHP-DEV] Comments on PHP security

2007-01-11 Thread Alain Williams
On Thu, Jan 11, 2007 at 08:06:16AM -0800, Rasmus Lerdorf wrote: Alain Williams wrote: On Thu, Jan 11, 2007 at 07:43:21AM -0800, Rasmus Lerdorf wrote: Alain Williams wrote: This has just appeared: http://www.theregister.co.uk/2007/01/11/php_apps_security/ There are some concrete

Re: [PHP-DEV] Comments on PHP security

2007-01-11 Thread Alain Williams
be looking to help those people - there are more of them than they are of us. -- Alain Williams Linux Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer. +44 (0) 787 668 0256 http://www.phcomp.co.uk/ Parliament Hill Computers Ltd. Registration Information: http

Re: [PHP-DEV] Comments on PHP security

2007-01-11 Thread Alain Williams
On Thu, Jan 11, 2007 at 05:38:58PM +0100, Christian Schneider wrote: Alain Williams wrote: One problem that I see persistently have is forgetting to declare variable 'global' in a function ... you only find out that something is wrong when the program misbehaves. Forcing variable

Re: [PHP-DEV] Comments on PHP security

2007-01-11 Thread Alain Williams
On Thu, Jan 11, 2007 at 12:05:45PM -0500, Ilia Alshanetsky wrote: On 11-Jan-07, at 9:41 AM, Alain Williams wrote: This has just appeared: http://www.theregister.co.uk/2007/01/11/php_apps_security/ Of many people who use PHP not many have strong programming background and even

Re: [PHP-DEV] Comments on PHP security

2007-01-11 Thread Alain Williams
On Thu, Jan 11, 2007 at 12:26:17PM -0500, Ilia Alshanetsky wrote: On 11-Jan-07, at 12:11 PM, Alain Williams wrote: The discussion is how PHP can help them to discover problems in their scripts. This is what led to Wietse Venema's suggestion about tainting a few weeks ago. These may be things

Re: [PHP-DEV] Comments on PHP security

2007-01-11 Thread Alain Williams
near this mail list. -- Alain Williams Linux Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer. +44 (0) 787 668 0256 http://www.phcomp.co.uk/ Parliament Hill Computers Ltd. Registration Information: http://www.phcomp.co.uk/contact.php #include std_disclaimer.h -- PHP

Re: [PHP-DEV] Comments on PHP security

2007-01-17 Thread Alain Williams
? -- Alain Williams Linux Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer. +44 (0) 787 668 0256 http://www.phcomp.co.uk/ Parliament Hill Computers Ltd. Registration Information: http://www.phcomp.co.uk/contact.php #include std_disclaimer.h -- PHP Internals - PHP Runtime

Re: [PHP-DEV] Comments on PHP security

2007-01-18 Thread Alain Williams
plug 90% of holes and then leave the rest for leisure... Effective fix means fixing all problems, not just 90% of it. The choice appears to be: 1) Fix for 90% of compromises, wait forever for fix for the last 10% 2) Wait forever for fix for 100% of compromises I vote (1). -- Alain Williams

Re: [PHP-DEV] Is this what Stefan Esser was referring to ...?

2007-01-21 Thread Alain Williams
what happened with the Debian firefox/iceweasle debacle. -Rasmus -- Alain Williams Linux Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer. +44 (0) 787 668 0256 http://www.phcomp.co.uk/ Parliament Hill Computers Ltd. Registration Information: http://www.phcomp.co.uk

Re: [PHP-DEV] variables in namespaces, was: On closures and lamdba

2010-02-23 Thread Alain Williams
\fred that cannot be accessed by code outside the namespace Variables in a namespace would not appear in $GLOBALS. -- Alain Williams Linux/GNU Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer. +44 (0) 787 668 0256 http://www.phcomp.co.uk/ Parliament Hill Computers Ltd

Re: [PHP-DEV] variables in namespaces, was: On closures and lamdba

2010-02-24 Thread Alain Williams
. -- Alain Williams Linux/GNU Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer. +44 (0) 787 668 0256 http://www.phcomp.co.uk/ Parliament Hill Computers Ltd. Registration Information: http://www.phcomp.co.uk/contact.php Past chairman of UKUUG: http://www.ukuug.org/ #include

Re: [PHP-DEV] variables in namespaces, was: On closures and lamdba

2010-02-24 Thread Alain Williams
On Wed, Feb 24, 2010 at 09:51:45AM +0100, Ferenc Kovacs wrote: maybe you want to pack your namespaced functions/classes with the global variables used with them. +1 Tyrael -- Alain Williams Linux/GNU Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer. +44 (0) 787 668

Re: [PHP-DEV] variables in namespaces, was: On closures and lamdba

2010-02-24 Thread Alain Williams
On Wed, Feb 24, 2010 at 02:20:38PM +0300, Alexey Zakhlestin wrote: On 24.02.2010, at 13:28, Alain Williams wrote: Objects are not always the answer. in situation, which you described, objects are definitely the answer. you have several functions, which share the same state. that's very

Re: [PHP-DEV] Next major version must be 7 (Lessons learned from the ECMAScript committee)

2010-03-13 Thread Alain Williams
feature set much less a release date. +1 I occasionally teach PHP courses and mention up coming features, but always with the caveat: nothing is set in stone until it hits the streets. -- Alain Williams Linux/GNU Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer. +44 (0

Re: [PHP-DEV] A critique of PHP 6

2010-04-20 Thread Alain Williams
if type juggle - should the rules be stricter than normal ? I agree that this would be a good idea - and could lead to better/faster code. +1 -- Alain Williams Linux/GNU Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer. +44 (0) 787 668 0256 http://www.phcomp.co.uk

  1   2   3   >