Skip to content

Instantly share code, notes, and snippets.

View vanbrabantf's full-sized avatar
😃

Frederick Vanbrabant vanbrabantf

😃
View GitHub Profile
{
"links": {
"self": "http://example.com/articles",
"next": "http://example.com/articles?page[offset]=2",
"last": "http://example.com/articles?page[offset]=10"
},
"data": [{
"type": "articles",
"id": "1",
"attributes": {
{
"status": "success",
"data": {
"post": {
"id": 1,
"title": "A blog post",
"body": "Some useful content"
}
}
}
{
"@odata.context": "serviceRoot/$metadata#People",
"@odata.nextLink": "serviceRoot/People?%24skiptoken=8",
"value": [
{
"@odata.id": "serviceRoot/People('russellwhyte')",
"@odata.etag": "W08D1694BD49A0F11",
"@odata.editLink": "serviceRoot/People('russellwhyte')",
"UserName": "russellwhyte",
"FirstName": "Russell",
{
"_links": {
"self": { "href": "/orders" },
"curies": [{ "name": "ea", "href": "http://example.com/docs/rels/{rel}", "templated": true }],
"next": { "href": "/orders?page=2" },
"ea:find": {
"href": "/orders{?id}",
"templated": true
},
"ea:admin": [{
Authorization: Bearer PlaceTokenHere
/api/v3/headis/players
Accept: application/vnd.github.v3+json
<?php
$car = new Car(4, 'Honda');
class Car
{
private $wheels;
private $engine;
public function __construct($wheels, $engine)
<?php
$car = new Car(4, 'Honda');
class Car
{
private $wheels;
private $engine;
public function __construct(int $wheels, string $engine)
<?php
$car = new Car<int, string>(4, 'Honda');
class Car<WheelType, EngineType>
{
private $wheels;
private $engine;
public function __construct(WheelType $wheels, EngineType $engine)