Bug #1282: strtok ignores zero's

From: Date: Thu, 01 Apr 1999 22:46:27 +0000
Subject: Bug #1282: strtok ignores zero's
Groups: php.dev 
Request: Send a blank email to php-dev+get-4875@lists.php.net to get a copy of this message
From: mf@swissmail.com Operating system: ReliantUNIX 5.44 C0033 PHP version: 3.0.7 PHP Bug Type: Misbehaving function Bug description: strtok ignores zero's I wrote a little function that 'inverts' ip-addresses. The following code fragment works fine except when $name is "127.0.0" for example. Then its result is only "127" and not "0.0.127" as I expect. $inv = ""; $tok = strtok( $name, "." ); while( $tok ) { if( $inv == "" ) { $inv = $tok; } else { $inv = "$tok.$inv"; } } I configured php with: --with-oracle=/oracle/app/oracle/product/8.0.5 --with-apache=../apache... --enable-track-vars -- PHP Development Mailing List http://www.php.net/ To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net For help: php-dev-help@lists.php.net

« previous php.dev (#4875) next »