@@ -84,13 +84,13 @@ public function getTypeFromFunctionCall(
8484			}
8585
8686			// The printf format is %[argnum$][flags][width][.precision]specifier. 
87- 			if  (preg_match ('/^%([0-9]*\$)?[0-9]*\.?[0-9]*([sbdeEfFgGhHouxX])$/ ' , $ constantStringgetValue (), $ matches1 ) {
88- 				if  ($ matches1 ] !== '' ) {
87+ 			if  (preg_match ('/^%(?P<argnum> [0-9]*\$)?(?P<width> [0-9]*) \.?[0-9]*(?P<specifier> [sbdeEfFgGhHouxX])$/ ' , $ constantStringgetValue (), $ matches1 ) {
88+ 				if  ($ matches' argnum ' '' ) {
8989					// invalid positional argument 
90- 					if  ($ matches1 ] === '0$ ' ) {
90+ 					if  ($ matches' argnum ' '0$ ' ) {
9191						return  null ;
9292					}
93- 					$ checkArgintval (substr ($ matches1 ], 0 , -1 ));
93+ 					$ checkArgintval (substr ($ matches' argnum ' 0 , -1 ));
9494				} else  {
9595					$ checkArg1 ;
9696				}
@@ -103,11 +103,13 @@ public function getTypeFromFunctionCall(
103103				// if the format string is just a placeholder and specified an argument 
104104				// of stringy type, then the return value will be of the same type 
105105				$ checkArgType$ scopegetType ($ args$ checkArgvalue );
106- 				if  ($ matches2 ] === 's ' 
106+ 				if  (
107+ 					$ matches'specifier ' ] === 's ' 
108+ 					&& ($ checkArgTypeisConstantValue ()->no () || $ matches'width ' ] === '' )
107109					&& ($ checkArgTypeisString ()->yes () || $ checkArgTypeisInteger ()->yes ())
108110				) {
109111					$ singlePlaceholderEarlyReturn$ checkArgTypetoString ();
110- 				} elseif  ($ matches2 ] !== 's ' ) {
112+ 				} elseif  ($ matches' specifier ' 's ' ) {
111113					$ singlePlaceholderEarlyReturnnew  IntersectionType ([
112114						new  StringType (),
113115						new  AccessoryNumericStringType (),
0 commit comments