Skip to content

Instantly share code, notes, and snippets.

View marcvdm's full-sized avatar

Marc van der Meulen marcvdm

View GitHub Profile

Keybase proof

I hereby claim:

  • I am marcvdm on github.
  • I am marcvdm (https://keybase.io/marcvdm) on keybase.
  • I have a public key whose fingerprint is 8395 1AD6 5421 8AEB 0232 2693 A3EA 65B6 7A1C C54C

To claim this, I am signing this object:

@marcvdm
marcvdm / behavior.md
Last active August 29, 2015 14:17
Scalar Type Hinting

I have noticed that there is a lot of commotion around the implementation of the scalar type hints. I haven't read all the discussions and i am certainly not a php core expert. I do however use (and love) php for a long time now.

So here is my take on how i think it should work.

Keep the default behavior so that legacy code keeps working and if you want to build a class/function that needs some stricter type hinting, then type hint it.

class Foo {}

function default_behavior($int, $string, Foo $foo = null)
{
@marcvdm
marcvdm / index.html
Created May 20, 2014 14:37
Adding icons inside form elements for bootstrap 3
<div class="form-group has-error">
<label for="exampleInputEmail1">Email address</label>
<div class="form-addon-left">
<i class="glyphicon glyphicon-envelope form-control-feedback"></i>
<input type="email" class="form-control" id="exampleInputEmail1" placeholder="Enter email">
</div>
</div>
<div class="form-group">
<label for="exampleInputEmail1">Email address</label>
<?php namespace Cartalyst\Sentry\Permissions;
/**
* Part of the Sentry package.
*
* NOTICE OF LICENSE
*
* Licensed under the 3-clause BSD License.
*
* This source file is subject to the 3-clause BSD License that is
* bundled with this package in the LICENSE file. It is also available at