# Deprecate define_syslog_variables in 5.3

- Thread: https://externals.io/message/40963
- Original archive: https://news-web.php.net/php.internals/40963
- Started by Kalle Sommer Nielsen on 2008-10-14T02:04:42+00:00
- Messages: 7
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #40963 — Kalle Sommer Nielsen — 2008-10-14T02:04:42+00:00

URL: https://externals.io/message/40963#40963

Hello internals

I've been looking at the function define_syslog_variables(), and I'm
unsure if its intentional to keep this old functionality in PHP,
seeing as define_syslog_variables defines a shortcut for each of the
LOG_* constants in the form of $LOG_*.

Therefore I propose the function is being deprecated in 5.3 and removed in HEAD.

-- 
Kalle Sommer Nielsen

---

## #40969 — Lukas Kahwe Smith — 2008-10-14T07:41:59+00:00

URL: https://externals.io/message/40963#40969 · In reply to: #40963

> Hello internals
>
> I've been looking at the function define_syslog_variables(), and I'm
> unsure if its intentional to keep this old functionality in PHP,
> seeing as define_syslog_variables defines a shortcut for each of the
> LOG_* constants in the form of $LOG_*.
>
> Therefore I propose the function is being deprecated in 5.3 and  
> removed in HEAD.


I agree. Fixing your code is easy (just remove the call to  
define_syslog_variables() and the $ in front of LOG), maintains BC  
with older PHP releases.

On the up side this function could create an insanely hard to debug  
problem for users, is redundant and was a very bad idea from the start  
(and the docs seem incorrect too).

That being said I never used this function or the constants in my  
code. So is there anyone that does actually use it and has some  
objection?

regards,
Lukas Kahwe Smith
mls@pooteeweet.org

---

## #40974 — Lars Strojny — 2008-10-14T08:53:56+00:00

URL: https://externals.io/message/40963#40974 · In reply to: #40963

Hi Kalle,

Am Dienstag, den 14.10.2008, 04:04 +0200 schrieb Kalle Sommer Nielsen:
[...]
> Therefore I propose the function is being deprecated in 5.3 and removed in HEAD.

+1

cu, Lars
-- 
   Jabber: lars@strojny.net
   Weblog: http://usrportage.de

---

## #40976 — John Carter -X johncart - PolicyApp Ltd@Cisco — 2008-10-14T12:08:58+00:00

URL: https://externals.io/message/40963#40976 · In reply to: #40969

We use syslog a lot. I've always found define_syslog_variables to be
pointless and frankly a little bizarre.

+1 on this.

John.

-----Original Message-----
From: Lukas Kahwe Smith [mailto:mls@pooteeweet.org] 
Sent: 14 October 2008 08:42
To: Kalle Sommer Nielsen
Cc: PHP Development
Subject: Re: [PHP-DEV] Deprecate define_syslog_variables in 5.3




> Hello internals
>
> I've been looking at the function define_syslog_variables(), and I'm 
> unsure if its intentional to keep this old functionality in PHP, 
> seeing as define_syslog_variables defines a shortcut for each of the
> LOG_* constants in the form of $LOG_*.
>
> Therefore I propose the function is being deprecated in 5.3 and 
> removed in HEAD.


I agree. Fixing your code is easy (just remove the call to  
define_syslog_variables() and the $ in front of LOG), maintains BC  
with older PHP releases.

On the up side this function could create an insanely hard to debug  
problem for users, is redundant and was a very bad idea from the start  
(and the docs seem incorrect too).

That being said I never used this function or the constants in my  
code. So is there anyone that does actually use it and has some  
objection?

regards,
Lukas Kahwe Smith
mls@pooteeweet.org

---

## #40985 — Markus Fischer — 2008-10-14T13:03:57+00:00

URL: https://externals.io/message/40963#40985 · In reply to: #40969

Hi,

Lukas Kahwe Smith wrote:
> That being said I never used this function or the constants in my code. 
> So is there anyone that does actually use it and has some objection?

Me neither, but in such cases it's probably a good idea to take a look 
at code search machines, e.g.

http://www.google.com/codesearch?as_q=define_syslog_variables&btnG=Search+Code&hl=en&as_lang=php&as_license_restrict=i&as_license=&as_package=&as_filename=&as_case=

or e.g. http://www.krugle.org/

cheers,
- Markus

---

## #40990 — Lukas Kahwe Smith — 2008-10-14T13:26:26+00:00

URL: https://externals.io/message/40963#40990 · In reply to: #40985

> Hi,
>
> Lukas Kahwe Smith wrote:
> > […]
>
> Me neither, but in such cases it's probably a good idea to take a  
> look at code search machines, e.g.
>
> http://www.google.com/codesearch?as_q=define_syslog_variables&btnG=Search+Code&hl=en&as_lang=php&as_license_restrict=i&as_license=&as_package=&as_filename=&as_case=
>

right .. and the interesting thing there is that most of the code is  
using the constants even though it calls the function to define the  
variables beforehand. the faulty documentation is probably the cause  
of this. so for the most part people will just need to remove the  
function call.

regards,
Lukas Kahwe Smith
mls@pooteeweet.org

---

## #41104 — Kalle Sommer Nielsen — 2008-10-15T23:20:34+00:00

URL: https://externals.io/message/40963#41104 · In reply to: #40990

Hi

2008/10/14 Lukas Kahwe Smith <mls@pooteeweet.org>:
>
> 
>
> > […]
>
> right .. and the interesting thing there is that most of the code is using
> the constants even though it calls the function to define the variables
> beforehand. the faulty documentation is probably the cause of this. so for
> the most part people will just need to remove the function call.

I've removed it from HEAD and added an `E_DEPRECATED` notice on
define_syslog_variables() in 5.3. If you're having
define_syslog_variables=On in HEAD, it will result in an `E_WARNING` 
just like safe_mode, magic_quotes ect.

Docs/wiki are updated aswell.

>
> regards,
> Lukas Kahwe Smith
> mls@pooteeweet.org
>
>
>
>
> --
> 
> 
>
>

regrads

-- 
Kalle Sommer Nielsen
