A WordPress-centric search engine for devs and theme authors



wp_exif_frac2dec ›

Since2.5.0
Deprecatedn/a
wp_exif_frac2dec ( $str )
Parameters:
  • (string) $str
    Required: Yes
Returns:
  • (int|float)
Defined at:
Codex:

Convert a fraction string to a decimal.



Source

function wp_exif_frac2dec( $str ) {
	@list( $n, $d ) = explode( '/', $str );
	if ( ! empty( $d ) ) {
		return $n / $d;
	}
	return $str;
}