64-bit signed integer to decimal with PHP?

28 views
Skip to first unread message

Frank Martens

unread,
May 5, 2016, 4:03:09 PM5/5/16
to AdWords API Forum

I'm getting the targeted monthly searches by the Google Adwords API. The problem is, the response looks like this:

Array (

[KEYWORD_TEXT] => StringAttribute Object (

[value] => zeemeerminpak [AttributeType] => StringAttribute [_parameterMap:Attribute:private] => Array ( [Attribute.Type] => AttributeType ) ) [TARGETED_MONTHLY_SEARCHES] => MonthlySearchVolumeAttribute Object ( [value] => Array ( [0] => MonthlySearchVolume Object ( [year] => 2016 [month] => 3 [count] => 7963946667997179586 ) [1] => MonthlySearchVolume Object ( [year] => 2016 [month] => 2 [count] => 6192852671664926392 ))
... more months ...
[AttributeType] => MonthlySearchVolumeAttribute [_parameterMap:Attribute:private] => Array ( [Attribute.Type] => AttributeType ) ) )


As you can see, I get a 64 bit integer (7963946667997179586,6192852671664926392) response. I've to handle this with PHP.


How can I create a decimal from a 64 bit integer with PHP?

Nadine Sundquist (AdWords API Team)

unread,
May 5, 2016, 6:41:58 PM5/5/16
to AdWords API Forum
Hi Frank,

That's an interesting one. Before I try to solve your issue with PHP, I would like to first check if those numbers even make sense coming back. They look larger than normal to me. Would you mind clicking Reply privately to author in the forum and sending me your client customer ID? That way I can replicate it from this side to see if it all looks good. If these truly are the numbers, then we can jump into solving what to do about PHP.

Thanks,
Nadine, AdWords API Team

Frank Martens

unread,
May 5, 2016, 7:20:58 PM5/5/16
to AdWords API Forum
Thanks, I've sended you a message!

Op donderdag 5 mei 2016 22:03:09 UTC+2 schreef Frank Martens:
Reply all
Reply to author
Forward
0 new messages