Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View salathe's full-sized avatar
🐮
🔥

Peter Cowburn salathe

🐮
🔥
  • Akamai Technologies
  • Edinburgh, Scotland
View GitHub Profile
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>mixed</type><methodname>gettimeofday</methodname>
<methodparam choice="opt"><type>bool</type><parameter>return_float</parameter><initializer>false</initializer></methodparam>
</methodsynopsis>
@salathe
salathe / gist:cd8b2ef3a0f91a75f7b3
Created June 3, 2015 11:31
PHP Doc build output
[peter@Bibracte phpdocs]$ svn co https://svn.php.net/repository/phpdoc/en/trunk en
A en/make_chm_index.html
A en/reference
... lots of lines ...
A en/README
U en
Checked out revision 336869.
[peter@Bibracte phpdocs]$ svn co https://svn.php.net/repository/phpdoc/doc-base/trunk doc-base
A doc-base/phpbook
pcowburn@ides ~/sources/crap/melody$ cat kittens.php
<?php
<<<CONFIG
packages:
- "calebeoliveira/kittens: dev-master"
CONFIG;
echo Kitten::get() . "\n";
pcowburn@ides ~/sources/crap/melody$ docker run --rm -t -v "$PWD:/tmp/melody" -w /tmp/melody davedevelopment/melody --no-cache kittens.php -vvv
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="/static/js/analytics.js"></script>
<script type="text/javascript">archive_analytics.values.server_name="wwwb-app14.us.archive.org";archive_analytics.values.server_ms=158;</script>
<link type="text/css" rel="stylesheet" href="/static/css/banner-styles.css"/>
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="/static/js/analytics.js"></script>
<script type="text/javascript">archive_analytics.values.server_name="wwwb-app14.us.archive.org";archive_analytics.values.server_ms=158;</script>
<link type="text/css" rel="stylesheet" href="/static/css/banner-styles.css"/>
[peter@Bibracte php-src.git (pull-request/865 *)]$ cat foo.php
<?php
$array = new ArrayIterator(array('a', array('b', 'c')));
$regex = new RegexIterator($array, '/banana/');
foreach ($regex as $match) {
var_dump($match);
}
[peter@Bibracte php-src.git (pull-request/865 *)]$ ./sapi/cli/php foo.php
@salathe
salathe / locales.php
Created August 25, 2014 14:39
PHP Intl Locales
<?php
foreach (IntlCalendar::getAvailableLocales() as $locale) {
echo $locale . ' => ' . Locale::getDisplayName($locale) . PHP_EOL;
}
<link rel="import" href="../core-scaffold/core-scaffold.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../core-menu/core-menu.html">
<link rel="import" href="../core-item/core-item.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-menu/core-submenu.html">
<polymer-element name="my-element">
salathe@php3:~# echo '<?php $str="example"; var_dump($str[1]); ?>' | ./php
X-Powered-By: PHP/3.0.18
Content-type: text/html
string(1) "x"