Last active
November 29, 2020 18:19
-
-
Save lechidung/43d7f4909055c3e7e6b0d6c26ce4476e to your computer and use it in GitHub Desktop.
PHP 8
This file contains 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 7 ***/ | |
class Point { | |
public float $x; | |
public float $y; | |
public float $z; | |
public function __construct( | |
float $x = 0.0, | |
float $y = 0.0, | |
float $z = 0.0, | |
) { | |
$this->x = $x; | |
$this->y = $y; | |
$this->z = $z; | |
} | |
} | |
/*** PHP 8 ***/ | |
class Point { | |
public function __construct( | |
public float $x = 0.0, | |
public float $y = 0.0, | |
public float $z = 0.0, | |
) {} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment