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 | |
interface CarService | |
{ | |
public function getCost(); | |
public function getDescription(); | |
} |
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 | |
// Defining a family of algorithms | |
class LogToFile implements Logger | |
{ | |
public function log($data) | |
{ | |
var_dump('Log the data to a file.'); |
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 | |
enum WheelSize: int | |
{ | |
case size_20 = 20; | |
case size_24 = 24; | |
case size_28 = 28; | |
private int $price; | |
public function __construct(int $price) |
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 | |
// Loose comparison | |
if (0 == false) { | |
echo "0 equals false"; | |
} else { | |
echo "0 does not equal false"; | |
} | |
// Output: "0 equals false" | |
// Type juggling |
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
SELECT | |
table_schema AS "information_schema", | |
SUM(data_length + index_length) / 1024 / 1024 AS "Size (MB)" | |
FROM information_schema.tables GROUP BY table_schema; | |
OlderNewer