Answers for "what is new in php 8"

PHP
0

php 8

pub   4096R/70D12172 2017-04-14 [expires: 2024-04-21]
      Key fingerprint = 1729 F839 38DA 44E2 7BA0  F4D3 DBDB 3974 70D1 2172
uid                  Sara Golemon <[email protected]>

pub   rsa4096 2020-05-09 [SC] [expires: 2024-05-08]
      BFDD D286 4282 4F81 18EF  7790 9B67 A5C1 2229 118F
uid           [ultimate] Gabriel Caruso (Release Manager) <[email protected]>
sub   rsa4096 2020-05-09 [E] [expires: 2024-05-08]
Posted by: Guest on July-10-2021
0

What’s New in PHP 8

Constructor Property Promotion
Validation for Abstract Trait Methods
Incompatible Method Signatures
Arrays Starting With a Negative Index
Union Types 2.0
Consistent Type Errors for Internal Functions
throw Expression
Weak Maps
Trailing Comma in Parameter List
Allow ::class syntax on objects
Attributes v2
Named Arguments
Nullsafe Operator
Saner String to Number Comparisons
Saner Numeric Strings
Match Expression v2
Stricter Type Checks for Arithmetic/Bitwise Operators
Posted by: Guest on December-24-2021
0

php8

// php8 class and construct
class Point {
  public function __construct(
    public float $x = 0.0,
    public float $y = 0.0,
    public float $z = 0.0,
  ) {}
}
Posted by: Guest on December-16-2020
-1

php 8 "<?="

<?= is a shorthand for <?php echo $a; ?>
Posted by: Guest on January-13-2021

Browse Popular Code Answers by Language