note 8420 added to sscanf

From: Date: Tue, 12 Sep 2000 08:59:19 +0000
Subject: note 8420 added to sscanf
Groups: php.notes 
Request: Send a blank email to php-notes+get-4755@lists.php.net to get a copy of this message
Actually sscanf()_always_ returns an array if you specify less return variables than format specifiers. i may change this to return a scalar if only a single format specifier exists. Note that sscanf() is (almost) the complete functional equivalent of its "C" counterpart, so you can do the following to get the expected effect : sscanf("SN/2350001","SN/%d",&$serial) The array return was a nicety for PHP. http://www.php.net/manual/function.sscanf.php

« previous php.notes (#4755) next »