Hello dear Zephir users,

A little background: this is my first attempt to write some Zephir code and the task is to translate php files into zephir.

I have the following php code:

define("is_new", 0);
define("folder", "temp");

if(is_new) {
    define("no", 33);
    define("file_path", "/var/www/".folder);

And I am trying to make a Zephir class out of it:

  class Settings
const is_new = true;
const folder = "temp";
const folder_path="/var/local/";
const no = 0;

  public function __construct() {

    if self::is_new == true {
      let self::no = 10;
    let self::folder_path .= "folder" ;

But I am getting errors:

Zephir\CompilerException: Class 'Test\Settings' does not have a property called: 'is_new ' in /home/vagrant/dev/test/test/test/settings.zep on line 106

So my questions are :

  1. How to define a constant based on whether another constant is true or not

  2. How to concatenate a constant with a constant