Date: 12/28/00
- Next message: Zeev Suraski: "Re: [PHP-DEV] License Choice: RE: [PHP-DEV] readline extension status?"
- Previous message: chris-php-bugs <email protected>: "[PHP-DEV] PHP 4.0 Bug #8419 Updated: get_browser() returns false"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
From: greg <email protected>
Operating system: Linux
PHP version: 4.0.4
PHP Bug Type: Reproduceable crash
Bug description: Using internal function in usort call segfaults
Using usort() with an internal function segfaults, for example using strcasecmp() in the usort call will fail, but making a function in php called testcmp() which then calls strcasecmp() works fine.
This worked in 4.0.3 and below
In the following code snipit, the script will print 1 and 2 but crash before 3.
$mblist[0] = "Drafts";
$mblist[1] = "LRP";
$mblist[2] = "Sent Items";
$mblist[3] = "INBOX";
$mblist[4] = "Apache";
$mblist[5] = "Internet";
$mblist[6] = "Lists";
$mblist[7] = "People";
$mblist[8] = "Personal";
Function testcmp( $a, $b )
{
return strcasecmp( $a, $b );
}
echo "1<BR>";
flush();
usort( $mblist, testcmp );
echo "2";
flush();
usort( $mblist, strcasecmp );
echo "3";
flush();
-- Edit Bug report at: http://bugs.php.net/?id=8463&edit=1-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Zeev Suraski: "Re: [PHP-DEV] License Choice: RE: [PHP-DEV] readline extension status?"
- Previous message: chris-php-bugs <email protected>: "[PHP-DEV] PHP 4.0 Bug #8419 Updated: get_browser() returns false"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

