note 45889 added to function.vprintf

From: Date: Wed, 22 Sep 2004 14:58:01 +0000
Subject: note 45889 added to function.vprintf
Groups: php.notes 
Request: Send a blank email to php-notes+get-77159@lists.php.net to get a copy of this message
Unlike sprintf, vprintf does NOT returns the formatted string, but its length. When using vprintf, it echoes the string. Beware. $string = "Bla %s bli"; $formatted = sprintf($string, 'ble'); // $formatted is 'Bla ble bli'. $formatted = vprintf($string, array('ble')); // this echoes 'Bla ble bli' // $formatted is 11. ---- Manual Page -- http://www.php.net/manual/en/function.vprintf.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+45889 Delete -- http://master.php.net/manage/user-notes.php?action=delete+45889&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+45889&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#77159) next »