MB>> the point is probably that there is no way in determinig whether a
MB>>certain function is supposed to work prior to calling it.
This is the case for all functions. For example, if you call mysql_query,
you have no way of knowing if it would succeed prior to calling it. So
__call is not m
On Wed, 4 Jan 2006, Stanislav Malyshev wrote:
> MB>> the point is probably that there is no way in determinig whether a
> MB>>certain function is supposed to work prior to calling it.
>
> This is the case for all functions. For example, if you call mysql_query,
> you have no way of knowing if
DR>>That is not fully true, as you can use function_exists() on
DR>>mysql_query, where there is no such possibility for methods that are
DR>>overloaded with __call().
That's correct, of course - this is the whole point of __call - it makes
_any_ function exist. Now, calling these functions may
Hi, I wrote the same mail some days ago in the general list and I asked also
on the #php IRC channel on Freenode but I didn't find any answer, so I try
here.
I need to set the default charset for my application to UTF-8 instead of
the default one of the webserver that is ISO-8859-1.
I've tried
Not really a question for internals.
header("Content-type: text/html; charset=UTF-8");
from your application will do the trick.
-Rasmus
Graziano Liberati wrote:
Hi, I wrote the same mail some days ago in the general list and I asked also
on the #php IRC channel on Freenode but I didn't find
Hi Graziano,
At 10:42 04.01.2006, you wrote:
I need to set the default charset for my application to UTF-8 instead of
the default one of the webserver that is ISO-8859-1.
I've tried to change the value of default_charset in php.ini and all it's ok,
but I need to set the value only for one applic
PHP had a bug when handling the default_charset in CGI mode.
Upgrading PHP will do the trick.
Nuno
Hi, I wrote the same mail some days ago in the general list and I asked
also
on the #php IRC channel on Freenode but I didn't find any answer, so I try
here.
I need to set the default charset f
Hello Stanislav,
but that is a way of having __call that obviously doesn't fit the real
world. In a real world application i only implement a few things with call
and dislike having all the others implemented automatically also. And the
i have to care about error generation while the engine coul
MB>> but that is a way of having __call that obviously doesn't fit the real
MB>>world. In a real world application i only implement a few things with call
MB>>and dislike having all the others implemented automatically also. And the
MB>>i have to care about error generation while the engine could
On Wed, 4 Jan 2006 10:19:22 +0100 (CET), in php.internals
[EMAIL PROTECTED] (Derick Rethans) wrote:
>That is not fully true, as you can use function_exists() on mysql_query,
>where there is no such possibility for methods that are overloaded with
>__call().
.. with some exceptions though (func
Stanislav Malyshev wrote:
MB>> but that is a way of having __call that obviously doesn't fit the real
MB>>world. In a real world application i only implement a few things with call
MB>>and dislike having all the others implemented automatically also. And the
MB>>i have to care about error genera
At Wednesday 4 January 2006 11:40, Rasmus Lerdorf you wrote:
> Not really a question for internals.
>
>header("Content-type: text/html; charset=UTF-8");
>
> from your application will do the trick.
>
> -Rasmus
In this way I set also the text/html content type, but I don't know prior the
execu
Hello Lukas,
that's right now also impossible. We would need an api change for that.
Or we would need to have the interface support deeply in the engine like
we have with the iterators. If that is ok for all among the engine
developers i think i can easily add it.
marcus
Wednesday, January 4,
Hello Stanislav,
where is the relation between __isset and __get/set/unset?
marcus
Wednesday, January 4, 2006, 12:32:29 PM, you wrote:
MB>>> but that is a way of having __call that obviously doesn't fit the real
MB>>>world. In a real world application i only implement a few things with call
At Wednesday 4 January 2006 11:45, Uwe Schindler you wrote:
> create a .htaccess file in the application directory where you use
> the "php_value" command to set this variable. See
> http://www.php.net/php_value
>
> The problem is that changing the charset in the script is too late
> (it is running
LS>>I think its obvious that you can implement things in userland or inside the
LS>>engine. The main advantage of doing it inside the engine is that it then
LS>>becomes the standard way of doing things, where as with userland its likely
LS>>that several competing "standards" will emerge. Not becaus
Stanislav Malyshev wrote:
LS>>I think its obvious that you can implement things in userland or inside the
LS>>engine. The main advantage of doing it inside the engine is that it then
LS>>becomes the standard way of doing things, where as with userland its likely
LS>>that several competing "standa
LS>>well in theory is_callable could also be called before __call() to save
LS>>people from having to duplicate the logic from __callable() and to have the
LS>>engine trigger the error. that is what i meant and like i said i do not
That would be major slowdown - why should engine call additional m
Stanislav Malyshev wrote:
LS>>well in theory is_callable could also be called before __call() to save
LS>>people from having to duplicate the logic from __callable() and to have the
LS>>engine trigger the error. that is what i meant and like i said i do not
That would be major slowdown - why sho
Hello Stanislav,
how is this a major slowdown? It would add a simple pointer check at
runtime and two places to set the pointer, one place will initialize it to
NULL and the other will store some function pointer just like all the other
__*()'s do.
marcus
Wednesday, January 4, 2006, 4:13:02 PM
MB>> how is this a major slowdown? It would add a simple pointer check at
MB>>runtime and two places to set the pointer, one place will initialize it to
MB>>NULL and the other will store some function pointer just like all the other
MB>>__*()'s do.
You would have two PHP functions: __callable() a
MB>> that's right now also impossible. We would need an api change for that.
MB>>Or we would need to have the interface support deeply in the engine like
MB>>we have with the iterators. If that is ok for all among the engine
MB>>developers i think i can easily add it.
What exactly is impossible t
Hello Stanislav,
both will have a function pointer on the c side so the major slowdown you
spoke of will only be there if one actually wants it. Otherwise there will
be only the pointer check.
marcus
Wednesday, January 4, 2006, 5:28:01 PM, you wrote:
MB>>> how is this a major slowdown? It wo
Hello Stanislav,
having non supported dynamic calls behave in the same way as build in or
user code methods.
marcus
Wednesday, January 4, 2006, 5:30:51 PM, you wrote:
MB>>> that's right now also impossible. We would need an api change for that.
MB>>>Or we would need to have the interface sup
MB>> both will have a function pointer on the c side so the major
MB>>slowdown you spoke of will only be there if one actually wants it.
MB>>Otherwise there will be only the pointer check.
I think you lost me. What exactly you are describing here? I though we
were talking about implementing so
MB>> having non supported dynamic calls behave in the same way as build
MB>>in or user code methods.
As defined code methods? Make your __call always return true and that is
what you'd get, not? Or you want it to behave as undefined methods? Then
make your __call to throw and error once it can
Hello Stanislav,
the point is integration but i see no point for further dicussion
unless you are willing to reread the thread and accept what we were
talking about here.
Wednesday, January 4, 2006, 6:02:41 PM, you wrote:
MB>>> having non supported dynamic calls behave in the same way as buil
Hello Stanislav,
just again, the point is integration so that you know whether it makes
any sense to call soemthing or not without having to check for errors
after the call.
marcus
Wednesday, January 4, 2006, 5:59:59 PM, you wrote:
MB>>> both will have a function pointer on the c side so the
MB>> the point is integration but i see no point for further dicussion
MB>>unless you are willing to reread the thread and accept what we were
MB>>talking about here.
"I won't talk to you unless you agree with me". Nice. Anyway, I don't see
any point in "integration" and any place in the engin
Support PHP drivers for IBM software
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
> Currently there is no way to detect if the __call overloads a particular
> method. Property overloading has __isset now in 5.1 - maybe for method
> overloading the equivalent should be something like __iscallable. Maybe
> method_exists should remain as is, as the method won't ever really exist
On Wed, Jan 04, 2006 at 02:20:45PM -0800, Sara Golemon wrote:
> > Currently there is no way to detect if the __call overloads a particular
> > method. Property overloading has __isset now in 5.1 - maybe for method
> > overloading the equivalent should be something like __iscallable. Maybe
> > met
This'll do what you want:
http://libssh2.org/dist/callable-1.0.tgz
Thanks Sara. Nice to see that others have the need. Works like a
charm. You rock.
Just for clarification. I didn't have a need for this, it's just something
I threw together today since it was simple...
Marcus, is this
Someone should likely check it out.
telnet bonsai.php.net 80
Trying 66.163.161.116...
Connected to cvs.php.net.
Escape character is '^]'.
GET / HTTP/1.1
Host: bonsai.php.net
HTTP/1.1 302 Found
Date: Thu, 05 Jan 2006 06:36:04 GMT
Server: Apache/1.3.34 (Unix) PHP/5.1.2RC2-dev
Location: http:/cvs.ph
34 matches
Mail list logo