Using the console is generally slow and it is not meant to be called in a loop, which is what I assume you want to do (derive 50000+ keys and addresses) based on your other topic; therefore it will only complicate a simple thing you want to do.
Yes, console is slow, therefor I want to do this in php to make the progress automatically.
Let's say I have 50,000 child addresses and how to sweep the balance(if any) to the first child address for spending it later?