.. php:method:: setDate($year, $month, $day) Set the date in the datetime object :param int $year: The year. :param int $month: The month. :param int $day: The day.
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 | |
{ | |
public function Foo() | |
{ | |
var_dump(__METHOD__); | |
} | |
public function __construct() | |
{ | |
var_dump(__METHOD__); |
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 | |
namespace PHP; | |
/** | |
* Array iterator like Ruby. | |
* | |
* @author Naoya Ito <[email protected]> | |
* licence: TBD | |
*/ | |
class ListRubyLike |
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 | |
/** | |
* Kyoto Tycoon's PHP RESTful client example. | |
* | |
* PHP version 5.2 | |
* | |
* Copyright (c) 2010 Shinya Ohyanagi, All rights reserved. | |
* | |
* Redistribution and use in source and binary forms, with or without | |
* modification, are permitted provided that the following conditions |
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
nnoremap [unite] <Nop> | |
nmap f [unite] | |
nnoremap [unite]u :<C-u>Unite<Space> | |
nnoremap <silent> [unite]f :<C-u>Unite -buffer-name=files file buffer file_mru< | |
CR> | |
nnoremap <silent> [unite]c :<C-u>UniteWithCurrentDir -buffer-name=files buffer | |
file_mru bookmark file<CR> | |
nnoremap <silent> [unite]o :<C-u>Unite outline<CR> | |
nnoremap <silent> [unite]O :<C-u>Unite outline -auto-preview<CR> |
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
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
use Benchmark; | |
use Net::Okuyama; | |
use Net::Riak; | |
my $okuyama = Net::Okuyama->new(hosts => 'localhost:8888'); | |
$okuyama->set('foo' => 'bar'); | |
my $riak = Net::Riak->new( |
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
$ $ phpunit SampleTest.php | |
PHPUnit 3.5.13 by Sebastian Bergmann. | |
.FPHP Fatal error: Class 'Sampl' not found in /private/tmp/SampleTest.php on line 18 | |
Fatal error: Class 'Sampl' not found in /private/tmp/SampleTest.php on line 18 |
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 | |
require_once 'silex.phar'; | |
$app = new Silex\Application(); | |
$app->get('/', function () { | |
return 'index'; | |
}); | |
$app->get('/hello/{name}', function ($name = '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
public function createApplication() | |
{ | |
return require __DIR__.'/path/to/app.php'; | |
} | |
OlderNewer