- GET
/source
change POST to GET: https://www.w3.org/TR/webdriver/#getting-page-source - POST
/element/:uuid/value
. Rename to/element/:uuid/sendKeys
https://www.w3.org/TR/webdriver/#dfn-element-send-keys - GET
/window/:uuid/size
. Rename to/window/size
. - GET/POST
/orientation
. Move to vendor extension (e.g./wda/orentation
)
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
<?hh | |
function f(?int $x): ?int { | |
if ($x === null) return $x; | |
else return $x * 2; | |
} | |
function x(): ?int { | |
return null; | |
} |
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
FROM ubuntu | |
ENV DEBIAN_FRONTEND noninteractive | |
RUN apt-get -y install wget | |
RUN wget -O - http://dl.hhvm.com/conf/hhvm.gpg.key | apt-key add - | |
RUN echo deb http://dl.hhvm.com/ubuntu trusty main | tee /etc/apt/sources.list.d/hhvm.list | |
RUN apt-get update | |
RUN apt-get -y install hhvm |
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
<?hh | |
function addOne(int $x): int { | |
return $x + 1; | |
} | |
function main() { | |
addOne(42); | |
addOne('foo'); | |
} |
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 | |
mb_internal_encoding("UTF-8"); | |
function λ($fn) { | |
list($args, $body) = explode('=>', $fn, 2); | |
$args = trim($args); | |
$args = ltrim($args, '('); | |
$args = rtrim($args, ')'); |
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 | |
function xs() { | |
$i = 0; | |
while (true) { | |
yield $i++; | |
} | |
} | |
$xs = xs(); |
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 | |
class Foo | |
{ | |
private $bar; | |
public function __construct(Bar $bar) | |
{ | |
$this->bar = $bar; | |
} | |
} |
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 | |
$xs = array(42); | |
foreach ($xs as $x) {} | |
var_dump(current($xs)); | |
$ys = array(42); | |
foreach ($ys as &$y) {} | |
var_dump(current($ys)); | |
$it = new ArrayIterator([42]); |
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 | |
function _sqrt($n) { | |
$x = 1.0; | |
$y = 0.5 * (1.0 + 1.0/$n); | |
$z = 1e-10; | |
while (abs($x/$y - 1) > $z) { | |
$x = $y; | |
$y = (0.5 * ($y + $n/$y)); |
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 | |
class App | |
{ | |
public $callables = []; | |
public function __construct() | |
{ | |
register_shutdown_function([$this, 'run']); | |
} |
NewerOlder