I understand how (in C) socketpair() is useful if I can fork(). It's not
obvious what I can do with the two sockets that socket_create_pair()
creates. What am I missing?
Thanks,
Leon
---
Leon Atkinson http://www.leonatkinson.com/
--
PHP Development Mailing List http://www.php.net
How about testing for the parent? Such as:
?
class AbstractClassException { }
class MyClass
{
var $salutation;
function MyClass()
{
if(!get_parent_class($this))
{
throw new AbstractClassException();
}
$this-salutation = 'Hello';
}
function
I was wondering, is PHP in future going to support threading? This would
be
a very nice feature.
I'am currently working on this project of mine, a FTP Server build in PHP
which serve MySQL database records. It actually does work very nice, also
multiple clients at the same time. It supports
static method, this is not the case.
?
class a
{
var $c;
function b()
{
return($this-c);
}
}
$d = new a;
if(is_callable(array($d, 'b'), FALSE, $name))
{
print($name);
}
?
Thanks!
---
Leon Atkinson http://www.leonatkinson.com/
--
PHP Development Mailing
The second argument seems to be for checking syntax only, but I can't
figure out how to make is_callable return FALSE when the second
argument is TRUE.
Try this:
var_dump(is_callable(array(1,2), true));
Hmm...OK. Yes, that does make is_callable return false. Can you explain
the logic
? I'm not sure if this has negative BC
issues.
I don't feel particularly passionate about this issue, it just occurred to
me as I was reviewing the function.
Comments?
Thanks,
Leon
---
Leon Atkinson http://www.leonatkinson.com/
--
PHP Development Mailing List http://www.php.net/
To unsubscribe
out on a limb
Would it be a tragedy to name both the CLI and CGI versions php on UNIX
and php.exe on Windows?
On UNIX, it doesn't seem like there'd be much confusion because make
install would put sapi/cli/php in /usr/local/bin and sapi/cgi/php in
/usr/local/apache/cgi-bin.
For the Windows
As Leon has suggested, why not just compile the variants into different
directories? Say add a cli/ (since the CLI is newer). Only one
directory
would go into the PATH (presumably).
That would also affect the ini setting for extension_dir. The default
value is ./ indicating the same
out on a limb
Would it be a tragedy to name both the CLI and CGI versions php on
UNIX
and php.exe on Windows?
Yes, it's a support nightmare.
limb broken=yes /
I defer to you.
Leon
--
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php
P.S. I wish people were following this list more closely so that we don't
have to discuss same issues over and over again.
But it's fun to argue over the same things every six months! :P
Leon
--
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit:
After having consulted with Andrei, Derick and others on irc here is
a proposal for a compromise:
On Unix:
1. Both cgi and cli are built as 'php' in their respective sapi
directories (pretty much as it is today except that cgi gets renamed
back from php-cgi to just php).
2. Make install
Possible values are:
- php_auth_exposure=user
Only PHP_AUTH_USER is exposed.
- php_auth_exposure=pw
Only PHP_AUTH_PW is exposed
- php_auth_exposure=user,pw
Both PHP_AUTH_USER and PHP_AUTH_PW are exposeed
Moriyoshi, have you considered using constants here instead of strings? For
There is no difference here, both are strings anyway. And the latest
option AUTH_EXPOSE_USER | AUTH_EXPOSE_PW wont work in an httpd.conf
file. Also, this is NOT the style we have in php.ini. I don't see any
valid point to use this thing.
Derick,
you may have a point about it not being as
Is there any possibility that
PHP return me a warning with the message (e.g.) Warning parameter
number for [function name] in [page.php] line [line number] ???
If you really need this behavior, do something like
assert('func_num_args() == 1');
That should generate the warning you describe if
A friend of mine had an uncle who taught dancing to middle-aged couples.
One day he visited some lessons and noticed that all the couples were
fussing, stepping on each other's feet and arguing. When he asked, what
gives? his uncle told him, if you're not fighting, you're not dancing.
(It may
Because this behavior is not documented
For the record, it is documented:
http://www.php.net/manual/en/function.strstr.php
If needle is not a string, it is converted to an integer and applied as the
ordinal value of a character.
And I'm sure it's worked this way for at least three years.
print END
table
trtdName:/tdtd{$= text2html($data['name']) }/td/tr
trtdAddress:/tdtdinput type=text value={$=
htmlspecialchars($data['address']) }/td/tr
/table
END;
Federico, you can always do this:
?
table
trtdName:/tdtd?= text2html($data['name']) ?/td/tr
trtdAddress:/tdtdinput type=text
and assignments. For
example:
?
class a {}
function c($c)
{
$c-name = 'C';
}
$a = new a;
$b = $a;
$a-name = A;
print($a-name);
$b-name = B;
print($a-name);
c($a);
print($a-name);
?
In ZE1 you get AAA. In ZE2 you get ABC.
Leon
---
Leon Atkinson http
The undocumented function exif_tagname() does lookups on the table
tag_table_IFD which matches IDF0 tags to human-readable names. Considering
exif_read_data() already uses this table, is there a reason to have this
function around? Debugging?
---
Leon Atkinson http://www.leonatkinson.com
It looks like imageline() draws the line twice.
RCS file: /repository/php4/ext/gd/gd.c,v
retrieving revision 1.241
diff -u -r1.241 gd.c
--- ext/gd/gd.c 31 Dec 2002 16:06:39 - 1.241
+++ ext/gd/gd.c 7 Jan 2003 21:54:37 -
@@ -2149,8 +2149,7 @@
else
#endif
This function isn't making the new image with the right dimensions.
# cvs diff ext/gd/libgd/gd.c
Index: ext/gd/libgd/gd.c
===
RCS file: /repository/php4/ext/gd/libgd/gd.c,v
retrieving revision 1.39
diff -u -r1.39 gd.c
---
Thanks for sticking with the issue, Greg.
If I may make an objective observation... Random users constantly submit
issues to the bug database that are clearly not problems with PHP, issues
that are better addressed in the mailing lists. I imagine it must be
frustrating to the QA team to have
Actually, I think it's a good idea to make a
summary of all those discussions
What about an always available discussion documentation on php.net ?
Avi Lewin writes an excellent weekly column that summarizes discussions on
this list.
http://www.zend.com/zend/week/index.php
Leon
--
PHP
23 matches
Mail list logo