I am trying out to find difference b/w a countable and a non countable object
First I found out the Type of object
echo gettype($data["current_fiat_currency"]);
Which is a Object
But when i had checked that it is a countable object or not
var_dump($data["current_fiat_currency"] instanceof Countable );
then it returns
False
Below is the object content
var_dump($data["current_fiat_currency"]);
object(stdClass)[2010]
public 'id' => string '1399' (length=4)
public 'currency_name' => string 'US Dollar' (length=9)
public 'currency_slug' => string '' (length=0)
public 'currency_code' => string 'USD' (length=3)
public 'currency_logo' => string '0' (length=1)
public 'currency_type' => string '3' (length=1)
public 'logo' => string '.png' (length=4)
public 'exe' => string '0' (length=1)
public 'logo_exe' => string '1' (length=1)
public 'symbol_native' => string '$' (length=1)
public 'symbol' => string '$' (length=1)
public 'name_plural' => string 'US dollars' (length=10)
public 'market_cap' => string '0' (length=1)
public 'circulating_supply' => string '0' (length=1)
public 'max_supply' => string '0' (length=1)
public 'total_supply' => string '0' (length=1)
public 'cryptoid_info_exe' => string '0' (length=1)
public 'show_on_website' => string '1' (length=1)
public 'default_selected' => string '1' (length=1)
public 'exchange_rate' => string '1' (length=1)
public 'currencies_stats_exe' => string '0' (length=1)
public 'currencies_stats_last_updated' => null
public 'mineable_or_not' => string '0' (length=1)
public 'show_on_top_bar' => string '0' (length=1)
public 'added_date' => string '2018-01-11 05:21:37' (length=19)
public 'graph_size_chart_status' => string '0' (length=1)
public 'twitter' => null
public 'reddit' => null
public 'status' => string '1' (length=1)
public 'for_pair_status' => string '0' (length=1)
So how i can convert a existing object to countable if it is not countable according to Php 7.2 because my codes working fine with Php 7.0.