leafo/lessphp — Issue #163: How can I pass in URLs as variables via PHP?
Author: sanchothefat
Created: 2011-12-15 12:11:02+00:00
State: open

I was working up a solution to incorporate this into a cms and I'd like it if the system could detect when variables change to force a recompile. It means people can set colours etc... via the backend.

I tried using something along the following with the parse method:

```php
parse( null, array( 'themeurl' => 'http://example.com/themes/theme/' ) );
?>
```

But it throws an exception saying it failed to parse the variable. There's some code that runs `preg_quote()` on the string with the second parameter as `'\'`.

Is there any way to get passed in URLs to work? Do I need to pass in an escaped string or should I use the ~"some string" type syntax maybe?