- FEATURES
- Autoload
- Class Reflection
- Magic Methods
- Exceptions
- Late Static Binding
- Type Hinting
- SPL
- PHPUNIT
- PHAR
- COMPOSER
- Carbon
- Guzzle
- Faker
-
Math
- Requests
- DESIGN PATTERNS
- Singleton Pattern
- Observer Pattern
- Strategy Pattern
- Dependency Injection
- Middleware
- Registry
- SYMFONY
- Routes
- Annotations
- Flex
- Controllers
- Doctrine
- Templating
- VERSIONS
- Php7.4
- Php8.0
- SECURITY
- Filter Input
- Remote Code Injection
- Sql Injection
- Session Fixation
- File Uploads
- Cross Site Scripting
- Spoofed Forms
- CSRF
- Session Hijacking
- MODERN PHP
- Composer
- Autoloader
- Package
- Releases
- Generators
- Dependency Injection
- Middleware
- CUSTOM FRAMEWORK
- App
- Http Foundation
- Front Controller
- Routing
- Render Controller
- Resolver
- SoC
- FRAMEWORKS
- Slim
- Symfony V5
- Laravel V8
- Laminas V3
- Codeigniter V4
Math
MathPHP is a powerful modern math library for PHP. composer require markrogoyski/math-php
require_once __DIR__ . '/vendor/autoload.php';
use MathPHP\Algebra;
use MathPHP\Arithmetic;
use MathPHP\Functions\Map;
use MathPHP\LinearAlgebra\MatrixFactory;
// Greatest common divisor (GCD)
echo $gcd = Algebra::gcd(8, 12) . "\n"; // 4
// Sum of digits
echo $digit_sum = Arithmetic::digitSum(99) . "\n"; // 18
// Map functions
$x = [10, 10, 10, 10];
$y = [1, 2, 5, 10];
$products = Map\Multi::multiply($x, $y);
echo implode(", ", $products) . "\n"; // 10, 20, 50, 100
// Matrix
$matrix = [
[1, 2, 3],
[4, 5, 6],
[7, 8, 9],
];
$A = MatrixFactory::create($matrix);
$row = $A->getRow(2);
echo implode(", ", $row) . "\n"; // 7, 8, 9
Last update: 416 days ago