first step of the generator in php