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
<?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 | |
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 myLog(string $message): string { | |
return $message; | |
} | |
function add(int $a, int $b): int { | |
myLog($a + $b); | |
return $a + $b; |
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 | |
function add(int $a, int $b): int { | |
myLog($a + $b); | |
return $a + $b; | |
} |
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.debugger.enable_debugger = true | |
hhvm.debugger.enable_debugger_server = true | |
hhvm.debugger.port = 8089 | |
hhvm.debugger.default_sandbox_path = /var/www/ | |
hhvm.debugger.startup_document = /var/www/index.php | |
hhvm.sandbox.sandbox_mode = true |
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
commit 0c41732a7ca14b15437f115c51b06e829988f048 | |
Author: Dan Miller <[email protected]> | |
Date: Fri Oct 3 16:27:06 2014 +0000 | |
Add config-scan-dir option | |
diff --git a/hphp/runtime/base/program-functions.cpp b/hphp/runtime/base/program-functions.cpp | |
index b97e086..ba803f6 100644 | |
--- a/hphp/runtime/base/program-functions.cpp | |
+++ b/hphp/runtime/base/program-functions.cpp |
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
require 'mustache' | |
output = Mustache.render("<h1>{{{blah}}</h1>", :blah=> "hello world!") | |
puts output | |
# => | |
#/Users/dmiller/.rbenv/versions/1.9.2-p180/lib/ruby/gems/1.9.1/gems/mustache-0.99.5/lib/mustache/parser.rb:264:in `error': Unclosed tag (Mustache::Parser::SyntaxError) | |
# Line 1 | |
# <h1>{{{blah}}</h1> | |
# ^ |
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 | |
require 'src/Mustache/Autoloader.php'; | |
Mustache_Autoloader::register(); | |
$m = new Mustache_Engine([ | |
'partials' => [ | |
], | |
]); |