You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
sprintf() exists, but vsprintf() (format + array of args) and sscanf() (parse string into variables) are missing. Zend stdlib and many PECL-style snippets depend on them; sscanf is the inverse of sprintf for simple parsers.
Category
stdlibProblem
sprintf()exists, butvsprintf()(format + array of args) andsscanf()(parse string into variables) are missing. Zend stdlib and many PECL-style snippets depend on them;sscanfis the inverse ofsprintffor simple parsers.php-src reference
ext/standard/sprintf.c—php_vsprintf(),php_sprintf()ext/standard/sscanf.c—php_sscanf(),php_sscanf_internal()ext/standard/basic_functions.c— registrationsRepro (failure today)
Expected (Zend):
a-3and42Actual: undefined function for
vsprintf/sscanf.Scope (this repo)
ext/standard/vsprintf.php,ext/standard/sscanf.phpvsprintf/sscanfwith reference-parameter lowering for$nout-args (see Language: Reference assignment and by-ref parameters #140 by-ref)ext/standard/Module.phptest/compliance/cases/stdlib/vsprintf_basic.phpt,sscanf_int.phptscript/capability-matrix.phpDone when
vsprintf('%s', ['ok'])==='ok'on VMsscanf('10 20', '%d %d', $a, $b)assigns$a=10,$b=20(VM reference args)Labels
stdlib,phase-4:stdlib,area:vm,implementation-readyRelated
sprintf()— existing loweringsscanfout-args