Unzip with SSH2 PHP Problem

How to unzip file .zip with ssh2 php

ssh2_exec($connection, 'unzip /opt/test/'.$name '-d /opt/tes/);

when extracting zip files are not all extracted even some files are missing. but when executing in the terminal extracted files perfectly.