.
|-- Actions
|-- APIs
| |-- Clients
| |-- Connectors
| |-- Gateways
| |-- Requests
| |-- Transports
|-- Bindings
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
php 5.6: | |
- constant expressions | |
- variadic functions | |
- rest operator (functions declarations / parameters) | |
- spread operator (function calls / arguments) | |
- exponentiation shorthand operator | |
- function and constant use declarations | |
- default utf-8 character encoding | |
- hash_equals function | |
- session_abort and sesseion_reset functions |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function roundNumber(float $number, int $precision = 2, string $separator = '.'): float | |
{ | |
if (str_contains($number, '.')) { | |
$parts = explode($separator, (string)$number); | |
$decimals = str_split($parts[1]); | |
$length = count($decimals); | |
$counter = $length - $precision; |