Skip to content

Instantly share code, notes, and snippets.

@rightfold
Last active August 29, 2015 14:00
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 rightfold/82aed89fbb06ebb0c4fd to your computer and use it in GitHub Desktop.
Save rightfold/82aed89fbb06ebb0c4fd to your computer and use it in GitHub Desktop.
% cat constants.const
namespace N {
group G {
A = 1;
B = 2;
}
}
% constc constants.const --php --javascript
% ls
G.php G.js
% cat G.php
<?php
namespace N;
final class G {
const A = 1;
const B = 2;
private function __construct() { }
}
% cat G.js
(window.N || window.N = { }).G = {
A: 1,
B: 2
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment