Re: [PHP-DEV] In regards to E_STRICT and PHP5

2005-06-16 Thread Pawel Bernat
On Thu, Jun 16, 2005 at 09:30:20AM -0700, boots wrote:
> If there is any merit to E_STRICT as it stands currently I find it to
> be negated by the fact that it throws messages for completely
> acceptable code that the engine is both willing and capable of
> handling. If var is not acceptable, I think it should be removed as a
> keyword. If it is acceptable, the engine shouldn't complain about it.
> (of course, I think it is acceptable.)
IMHO "var" is accepted for backward compability. If E_STRICT message
really annoys you, set proper error_reporting level and forget about it.


Regards, P.
-- 
Paweł Bernat; uselessness' lover;
select''as email;
Slowly and surely the unix crept up on the Nintendo user ...

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DEV] [Fwd: [PHP] constant() - php5]

2005-07-01 Thread Pawel Bernat
>  
> $cnst = "DEBUG";
> 
> // what I want to do but can't
> if ($dbg = constant($cnst)) {
>   // do stuff
> }
> 
> // the only real option, it seems - bit long winded to get round a stupid 
> (IMHO)
> if (defined($cnst) && ($dbg = constant($cnst))) {
>   // do stuff
> }
What is stupid with validating name before using it?

p.
-- 
Paweł Bernat; uselessness' lover;
select''as email;
Slowly and surely the unix crept up on the Nintendo user ...

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DEV] parent::construct not reliable working on php5.1 b2/b3

2005-08-02 Thread Pawel Bernat
On Tue, Aug 02, 2005 at 03:42:00PM +0100, Meno Abels wrote:
> Hello,
> 
> With my application that uses heavily inherent classes, sometimes I
> get the following message:
> PHP Fatal error:  Call to undefined method Rank::_construtor() in
> .../inc/Links.class.php.   It works with php
> 4.x when I use the old style of constructor calling 
> $this->(CLASSNAME) . But when working with php 5.2 b2 or b3 in the old
> OR the new style, I get the PHP Fatal error from above.
> Is there any hints to look at this problem?
Why do you call _construct instead of __construct? And how do you do it?
Did you read everything at http://php.net/construct (including Note)?
What about php 5.0?

-- 
Paweł Bernat; uselessness' lover;
select''as email;
Slowly and surely the unix crept up on the Nintendo user ...

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DEV] GET/POST whitespace stripping behavior

2005-08-08 Thread Pawel Bernat
On Mon, Aug 08, 2005 at 03:37:53PM +0200, Christopher Kunz wrote:
> Hi,
> 
> I have a general question in regard to the PHP variable normalizing. 
> Obviously, 
> leading whitespace in a variable is stripped, but why is trailing whitespace 
> converted to underscores?
See http://php.net/manual/en/function.urldecode.php
-- 
Paweł Bernat; uselessness' lover;
select''as email;
Slowly and surely the unix crept up on the Nintendo user ...

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DEV] Strict Standards and nonexistent instances.

2005-02-09 Thread Pawel Bernat
Hello,

when use of nonexistent object happens, PHP generates E_STRICT
message ("Creating default object from empty value") -
via make_real_object (zend_execute.c).

Unfortunately, it appears only if it's like:
$idontexist->someinteger = 1;
$idontexist->somestring = 'foo';
$idontexist->somearray = array('bar');

When call is $idontexist->somearray[] = 'bas'; nothing
happens, but looks like stdClass instance is spawned.

Is it expected behaviour or just a bug? It's really
annoying to find typos in instances names without
such message, also I found no way to intercept them
via __autoload as PHP creates stdClass instance silently
(maybe playing around stdClass would help, but well...).

Best regards,
-- 
Paweł Bernat; uselessness' lover;
select''as email;
Slowly and surely the unix crept up on the Nintendo user ...

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php