This is the same as trying to reference stuff in the global namespace, such as PHPs predefined functions. We shouldn't have to prefix them with "", they should just resolve anyway.
| <?php | |
| // Make sure there is an array to append to. | |
| if (!isset($this->handlers[$type])) { | |
| $this->handlers[$type] = []; | |
| } | |
| // Append the error handler | |
| $this->handlers[$type][] = $handler; |
| var Obj = (function() { | |
| // Private Methods | |
| var private = {}; | |
| // Instance Variables | |
| var variables = {}; | |
| // Public Methods | |
| var methods = {}; |
| <?php | |
| function contains_null($value) { | |
| $all_null = true; | |
| foreach ($value as $val) { | |
| if (!is_null($val)) { | |
| $all_null = false; | |
| break; | |
| } | |
| } |
| <?php | |
| class Account extends AppModel { | |
| var $hasOne = array( | |
| 'Status' => array( | |
| 'foreignKey' => false, | |
| 'conditions' => array( | |
| 'Account.store = Status.store' | |
| ) |
| SELECT *, count(*) as num, count(hash) FROM table GROUP BY hash HAVING num > 1 |
| // Store object | |
| var Store = (function() { | |
| var id = 0; | |
| var getObjectId = function(obj) { | |
| if (!obj) obj = this; | |
| if (this !== obj) return getObjectId.call(obj); | |
| if (typeof this.__objectId === 'undefined') { |
| * { padding: 0; margin: 0; } | |
| body { background: #eeeeee; } | |
| img { | |
| -webkit-filter: grayscale(100%); | |
| position: absolute; | |
| top: 50%; | |
| left: 50%; | |
| margin-top: -150px; | |
| margin-left: -150px; | |
| -webkit-animation: down 1s ease, scale 1s ease .5s; |
Firstly, I'd like to debunk any claims that I can't have a valid reason because I "don't use LESS enough". My work actually uses LESS for all it's sites, and I use Compass for all my personal projects.
Talking about Compass, that's actually my first point. I am yet to see any extension for less that makes CSS as easy as Compass does. I no longer have to worry about vendor prefixes, and I don't need to worry about code bloat, as it only gives you vendor prefixes for browsers that will actually use on them. You can also autogenerate sprites, autominify your code output, in browser mesages for error messages (using some cool psuedo element techniques), it can output so many different prefered outputs, it's freaking awesome.
Another reason, is it's syntax is closed to CSS in my opinion. Anything that could use a block, or includes something,
| var_dump($argv, $_SERVER['SCRIPT_FILENAME'], __FILE__); | |
| // array(1) { | |
| // [0]=> | |
| // string(9) "index.php" | |
| // } | |
| // string(9) "index.php" | |
| // string(44) "/Users/Nathaniel/Projects/Scaffold/index.php" |