Skip to content

Instantly share code, notes, and snippets.

@dshafik
Created July 8, 2015 02:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dshafik/c95439d7d2f4edb9eca6 to your computer and use it in GitHub Desktop.
Save dshafik/c95439d7d2f4edb9eca6 to your computer and use it in GitHub Desktop.
<?php
$foo = 'Foo';
$class = 'CLASS';
$constant = 'BAR';
echo $foo::$class::$constant;
echo $foo::{$class}::$constant;
echo $foo::{"$class"}::$constant;
echo $foo::{"$class"}::{"$constant"};
echo $foo::CLASS::$constant;
echo $foo::CLASS::{"$constant"};
echo $foo::($class)::($constant);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment