<?php
/**
* __ _ ___ ___ ___ ___ ___ ____ _ __ ___ ___
* / _` |/ / / __/ _ \ / _ \ / / / __/| '_ ` _ \ / /
* | (_| |\ \| (_| (_) | (_) |\ \ | (__ | | | | | |\ \
* \__,_|/__/ \___\___/ \___/ /__/ \___\|_| |_| |_|/__/
*
*
************************************************************************************
* @ASCOOS-NAME : ASCOOS CMS 25' *
* @ASCOOS-VERSION : 25.0.0 *
* @ASCOOS-CATEGORY : Framework (Frontend and Administrator Side) *
* @ASCOOS-CREATOR : Drogidis Christos *
* @ASCOOS-SITE : www.ascoos.com *
* @ASCOOS-LICENSE : [Commercial] http://docs.ascoos.com/lics/ascoos/AGL.html *
* @ASCOOS-COPYRIGHT : Copyright (c) 2007 - 2025, AlexSoft Software. *
************************************************************************************
*
* @package : ASCOOS FRAMEWORK - TEconomicsHandler Examples
* @subpackage : Calculate the earnings per share based on net income and number of shares.
* @source : examples/earnings_per_share.php
* @fileNo :
* @version : 25.0.0
* @build : 10831
* @created : 2025-01-06 07:00:00 UTC+2
* @updated :
* @author : Drogidis Christos
* @authorSite : www.alexsoft.gr
* @license : AGL-F
*
* @since PHP 8.2
*/
require_once '../class/coreEconomics.php';
use ASCOOS\FRAMEWORK\Extras\Economics\TEconomicsHandler;
/*
<English> Example 1: Earnings per share (EPS) calculation
<Greek> ?????????? 1: ??????????? ?????? ??? ?????? (EPS)
*/
/*
<English> Data
<Greek> ????????
*/
$array = [
'net_income' => 500000, // Net income
'number_of_shares' => 10000 // Number of shares
];
/*
<English> Create an object
<Greek> ?????????? ????????????
*/
$objEconomic = new TEconomicsHandler($array);
/*
<English> EPS calculation
<Greek> ??????????? EPS
*/
$eps = $objEconomic->earnings_per_share();
echo "Earnings per share (EPS): $eps"._LN;
$objEconomic->Free($objEconomic);
|