Hello Bob,
Thursday, October 27, 2005, 8:51:18 AM, you wrote:
> Hi,
> Since NULL typehints are allowed in userland, how would I go about it in C?
> I have ZEND_ARG_OBJ_INFO(0, obj, ZObject, 1) which has allow null set on.
> Then in the method:
> if (zend_parse_parameters(ZEND_NUM_ARGS() TSRML
On Wed, 26 Oct 2005, Ilia Alshanetsky wrote:
> IMHO this is a bad idea, if you really wanted to support NULL in a
> particular case you, as a developer could do:
> php -r '$n=NULL; foreach((array)$n as $v);'
>
> Making NULL usage transparent where array is expects will lead to
> difficult to debu
On 10/27/05, Derick Rethans <[EMAIL PROTECTED]> wrote:
>
> On Wed, 26 Oct 2005, Ilia Alshanetsky wrote:
>
> > IMHO this is a bad idea, if you really wanted to support NULL in a
> > particular case you, as a developer could do:
> > php -r '$n=NULL; foreach((array)$n as $v);'
> >
> > Making NULL usag
On Wed, 26 Oct 2005, Ilia Alshanetsky wrote:
Greg Beaver wrote:
amen, this behavior makes no sense even though sizeof() is an alias to
count(). sizeof('this') and sizeof('this long thing') are both 1, which
makes no sense. I would go so far as to say a E_NOTICE is more
appropriate than E_STR
On Thu, 27 Oct 2005, Jochem Maas wrote:
advanced code should be checking vars properly before using them and, well,
for any given foreach loop there is often enough an 'if (!count($array))'-like
statement to take care of the 'empty' case. and in cases when speed is very
important
..and wh
On Thu, 27 Oct 2005, Hannes Magnusson wrote:
> On 10/27/05, Derick Rethans <[EMAIL PROTECTED]> wrote:
> >
> > On Wed, 26 Oct 2005, Ilia Alshanetsky wrote:
> >
> > > IMHO this is a bad idea, if you really wanted to support NULL in a
> > > particular case you, as a developer could do:
> > > php -r '
Jani Taskinen wrote:
On Thu, 27 Oct 2005, Jochem Maas wrote:
advanced code should be checking vars properly before using them and,
well,
for any given foreach loop there is often enough an 'if
(!count($array))'-like
statement to take care of the 'empty' case. and in cases when speed is
very i
I tried the "|!O" and that really hoses things.
The | gets processed in zend_parse_va_args and removed (spec is
incremented), so that "!O" get sent to zend_parse_arg_impl. Inside of
zend_parse_arg_impl, the ! gets set to char c and spec_walk gets incremented
which makes the check for the null oper
I have developed a php extension that requires zlib in order to works
fine.
The problem is that if someone have compiled php without zlib support
my extension just crashed when it tries to use some zlib routines.
I wonder if there is a way to check at runtime (or better at startup
in the PH
> I have developed a php extension that requires zlib in order to works
> fine.
> The problem is that if someone have compiled php without zlib support
> my extension just crashed when it tries to use some zlib routines.
>
> I wonder if there is a way to check at runtime (or better at startup
> in
Hello Bob,
that's definitively wrong, actually there must be something wrong with
your code. The '|' is to ensure that the parameter is optional. Thus if you
moit the param it's return value is untouched which means you have to
initaialize the returned zval * to null before passing its address t
Hello Jochem,
Thursday, October 27, 2005, 12:49:57 PM, you wrote:
> Jani Taskinen wrote:
>> On Thu, 27 Oct 2005, Jochem Maas wrote:
>>
>>> advanced code should be checking vars properly before using them and,
>>> well,
>>> for any given foreach loop there is often enough an 'if
>>> (!count($ar
Marcus Boerger wrote:
Hello Bob,
that's definitively wrong, actually there must be something wrong with
your code. The '|' is to ensure that the parameter is optional. Thus if you
moit the param it's return value is untouched which means you have to
initaialize the returned zval * to null befo
Hello Rob,
args, shit you're right!
marcus
Thursday, October 27, 2005, 8:35:12 PM, you wrote:
> Marcus Boerger wrote:
>>Hello Bob,
>>
>> that's definitively wrong, actually there must be something wrong with
>>your code. The '|' is to ensure that the parameter is optional. Thus if you
>>moi
Thanks guys, the O! works as expected. It didn't need the | since I actually
want to force a parameter to be sent even if it is null.
I did think it was weird that the parse_parameter functions set the zval*
passed in to NULL instead of setting the value/type of the zval to IS_NULL.
This took a bi
Thank you for the info.
I have some questions/suggestions (they may be silly - please feel
welcome to tell me so, if they are):
You have solved the problem (grievance number 5) of file based scoping,
by introducing a function that can only be used within __autoload (the
autoload_import_class
Hi
I'm having this problems with php 5.1 latest snapshot and mysql 5.0.15 only
on linux FC4. On windows works fine.
This code:
$pdo = new PDO('mysql:host=localhost;dbname=dbtest', 'user', 'pass');
$pdo->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );
$stmt = $pdo->prepare('select *
Hi Kevin,
Kevin Newman wrote:
> Thank you for the info.
>
> I have some questions/suggestions (they may be silly - please feel
> welcome to tell me so, if they are):
>
> You have solved the problem (grievance number 5) of file based scoping,
> by introducing a function that can only be used wit
Sorry
There are only problems with pdo
mysqli problems were due to zend.ze1_compatibility_mode = On. Now it's off
and no mysqli errors.
best regards
""Holografix"" <[EMAIL PROTECTED]> escreveu na mensagem
news:[EMAIL PROTECTED]
> Hi
>
> With PHP 5.1 knocking at the door, I guess many people w
A backtrace would help a lot
On 10/27/05, Holografix <[EMAIL PROTECTED]> wrote:
> Sorry
> There are only problems with pdo
>
> mysqli problems were due to zend.ze1_compatibility_mode = On. Now it's off
> and no mysqli errors.
>
> best regards
>
>
> ""Holografix"" <[EMAIL PROTECTED]> escreveu na me
I think we should be keeping the warning (i.e. -1 for the change).
I don't see a reason why overloaded objects can't expose an API of an
empty array() instead of changing this behavior to fit the
implementation. But even if it weren't so, there has to be a good
reason to change the general case
Hi,
Am I correct in saying that a class property cannot be initialized to an
array? Looking at zend_declare_property
it clearly states that Internal zvals cant be arrays.
So how would I go about creating the following inherited property in all my
subclasses if my core class has this proper
Hi Bob Silva, you wrote:
> Hi, In other words, how would I create a property that is an array
> (in C) where that property is available to all my subclasses WITHOUT
> initializing it manually in the __construct, which would force each
> subclass constructor to call its parent (while good design,
23 matches
Mail list logo