I hereby claim:
- I am niklasvh on github.
- I am niklasvh (https://keybase.io/niklasvh) on keybase.
- I have a public key whose fingerprint is 1C7A 2DB2 CD3A 7751 F0FE 281D 0920 1301 126A 143A
To claim this, I am signing this object:
var Immutable = require('immutable'); | |
var Bacon = require('baconjs'); | |
var Constants = require('../constants/AppConstants'); | |
var create = text => Immutable.Map({ | |
id: (+new Date() + Math.floor(Math.random() * 999999)).toString(36), | |
complete: false, | |
text: text | |
}); |
I hereby claim:
To claim this, I am signing this object:
#!/bin/bash | |
# Setup and start Sauce Connect for your TravisCI build | |
# This script requires your .travis.yml to include the following two private env variables: | |
# SAUCE_USERNAME | |
# SAUCE_ACCESS_KEY | |
# Follow the steps at https://saucelabs.com/opensource/travis to set that up. | |
# | |
# Curl and run this script as part of your .travis.yml before_script section: | |
# before_script: |
<?php | |
echo "*** Testing token_get_all() : 'source' string with different constants ***\n"; | |
$a = 1; | |
$b = 0; | |
$source = array ( | |
// int const |
<?php | |
echo "\nDirectly changing array values.\n"; | |
$a = array("original.1","original.2","original.3"); | |
foreach ($a as $k=>$v) { | |
$a[$k]="changed.$k"; | |
var_dump($v); | |
} | |
var_dump($a); |
<?php | |
function i1() { | |
echo "i1\n"; | |
return 1; | |
} | |
function i2() { | |
echo "i2\n"; | |
return 1; |
<?php | |
function f($x) { | |
echo "f($x) "; | |
return $x; | |
} | |
echo "Function call args:\n"; | |
var_dump(f($i=0) < f(++$i)); | |
var_dump(f($i=0) <= f(++$i)); | |
var_dump(f($i=0) > f(++$i)); |
<?php | |
// simple case with missing element | |
$f = array("hello","item2","bye"); | |
list($a,,$b) = $f; | |
echo "A=$a B=$b\n"; | |
// Warning: Cannot use a scalar value as an array in %s on line %d | |
$c[$c=1] = 1; |
<?php | |
class object implements ArrayAccess { | |
public $a = array('1st', 1, 2=>'3rd', '4th'=>4); | |
function offsetExists($index) { | |
echo __METHOD__ . "($index)\n"; | |
return array_key_exists($index, $this->a); | |
} | |
function offsetGet($index) { |
<?php | |
$func = create_function('',' | |
static $foo = 0; | |
return $foo++; | |
'); | |
var_dump($func()); | |
var_dump($func()); | |
var_dump($func()); | |
?> |