unidox Posted September 30, 2009 Share Posted September 30, 2009 I have this function: private function getLong(&$string) { $data = substr($string, 0, 4); $string = substr($string, 4); $data = unpack('Vvalue', $data); return $data['value']; } But I am getting the error: Warning: unpack() [function.unpack]: Type V: not enough input, need 4, have 0 The error line is $data = unpack('Vvalue', $data); Whats wrong? Quote Link to comment https://forums.phpfreaks.com/topic/176004-function/ Share on other sites More sharing options...
RussellReal Posted September 30, 2009 Share Posted September 30, 2009 looks like it should work >.> Quote Link to comment https://forums.phpfreaks.com/topic/176004-function/#findComment-927419 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.