PHP log10() Function – Base‑10 Logarithm
The PHP log10() function returns the base‑10 logarithm of a floating‑point argument, detailing its signature, parameter description, return value, and providing example code with expected output for various inputs.
The log10() function in PHP returns the base‑10 logarithm of a given floating‑point argument.
Signature: float log10(float $arg) Parameter: $arg – the number to calculate the logarithm for.
Return value: The base‑10 logarithm of $arg as a float.
Example:
<?php
echo log10(2.7183);
echo log10(2);
echo log10(1);
echo log10(0);
echo log10(-1);
?>Output:
0.434297385125
0.301029995664
0
-INF
#INDSigned-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Laravel Tech Community
Specializing in Laravel development, we continuously publish fresh content and grow alongside the elegant, stable Laravel framework.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
