Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

dsimensen's avatar

How can I make $faker->paragraph longer?

I want to make the paragraph the size of an actual post. What I'm getting right now is almost as short as $faker->sentence. I can't find any specifics on the $faker variable and what I can do to it online.

0 likes
2 replies
Nakov's avatar
Nakov
Best Answer
Level 73

And here is the definition of the method itself:

@method string paragraph($nbSentences = 3, $variableNbSentences = true)

which means the default is 3 sentences, so it can't be short as a sentence. But still you can pass bigger number:

$faker->paragraph(10)

as an example.

1 like

Please or to participate in this conversation.