Understanding PHP’s sinh() Function: Hyperbolic Sine Explained with Examples

Learn how PHP’s sinh() function computes the hyperbolic sine of a number, its signature, parameter description, return type, and see practical code examples that demonstrate results for positive, negative, zero, and constant inputs like π and π/2.

Laravel Tech Community
Laravel Tech Community
Laravel Tech Community
Understanding PHP’s sinh() Function: Hyperbolic Sine Explained with Examples

In PHP, the sinh() function returns the hyperbolic sine of a given numeric argument, defined as (exp(arg) - exp(-arg)) / 2.

Signature float sinh(float $arg) Parameter $arg – the value whose hyperbolic sine is to be calculated.

Return value

The hyperbolic sine of $arg as a float.

Examples

<?php
echo sinh(3) . "<br>";      // 10.01787492741
echo sinh(-3) . "<br>";     // -10.01787492741
echo sinh(0) . "<br>";      // 0
echo sinh(M_PI) . "<br>";    // 11.548739357258
echo sinh(M_PI_2) . "<br>"; // 2.3012989023073
Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

BackendPHPphp-functionsmath functionshyperbolic-sine
Laravel Tech Community
Written by

Laravel Tech Community

Specializing in Laravel development, we continuously publish fresh content and grow alongside the elegant, stable Laravel framework.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.