+def _quote_php_variable(var_type, config, conf_name):
+ if var_type == bool:
+ return 'true' if config.get_bool(conf_name) else 'false'
+
+ if var_type == int:
+ return getattr(config, conf_name)
+
+ if not getattr(config, conf_name):
+ return 'false'
+
+ quoted = getattr(config, conf_name).replace("'", "\\'")
+ return f"'{quoted}'"
+
+