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
| <?hh | |
| declare(strict_types=1); | |
| function myLog(string $message=null): string { | |
| if ($message === null) { | |
| return ''; | |
| } else { | |
| return $message; | |
| } | |
| } |
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
| <?hh | |
| declare(strict_types=1); | |
| function myLog(?string $message=null): string { | |
| if ($message === null) { | |
| return ''; | |
| } else { | |
| return $message; | |
| } | |
| } |
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 | |
| declare(strict_types=1); | |
| function add(float $a, float $b): float { | |
| return $a + $b; | |
| } | |
| echo add(1, 2); |
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
| <?hh | |
| function myLog(string $message): string { | |
| return $message; | |
| } |
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
| <?hh // strict | |
| class Caller { | |
| public function set(string $property_name, Foo $object): void { | |
| $object->$property_name = 'poopy'; | |
| } | |
| public function call(string $property_name, Foo $object): string { | |
| return $object->$property_name; | |
| } | |
| } |
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
| hhvm.log.use_syslog = false | |
| hhvm.log.use_cronolog = true | |
| hhvm.log.use_log_file = true | |
| hhvm.log.file = /var/log/hhvm/hhvm.log-%Y-%m-%d | |
| hhvm.log.sym_link = /var/log/hhvm/hhvm.log | |
| hhvm.log.always_escape_log = false | |
| hhvm.log.header = true | |
| hhvm.log.always_log_unhandled_exceptions = false |
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
| <?hh | |
| class Wrapper<Tval as num> { | |
| private Tval $value; | |
| public function __construct(Tval $value) { | |
| $this->value = $value; | |
| } | |
| public function setValue(Tval $value): void { | |
| $this->value = $value; |
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
| <?hh | |
| class Wrapper<Tval as num> { | |
| private Tval $value; | |
| public function __construct(Tval $value) { | |
| $this->value = $value; | |
| } | |
| public function setValue(Tval $value): void { | |
| $this->value = $value; |
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 | |
| class Foo { | |
| public function shape($bar, $baz) { | |
| } | |
| } |
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
| <?hh | |
| interface ExceptionWithCode { | |
| public function getCode(); | |
| } | |
| class Checkout_Exception extends Exception implements ExceptionWithCode { | |
| protected $data = []; | |
| public function __construct($msg = "", $code = 0, $data = []) { |