Re: How do you handle debug code? Removing from production versus conditional execution
[email protected] (The Doctor) Sun, 23 Apr 2023 12:03:27 -0000 (UTC)
| Newsgroups | comp.lang.php |
|---|---|
| Organization | NetKnow News |
| Message-ID | <[email protected]> |
In article <[email protected]>, Angle <[email protected]> wrote: >You know how stupid You look ? It is absolutely beyond belief !!!!!!!!!!!!!= >!! > > > >On Friday, May 3, 2019 at 3:00:29=E2=80=AFAM UTC+2, Ryan wrote: >> Perhaps an age old question, but how do you all deal with your debug code= >? Do you remove it before deploying to production, if so how do you make su= >re you remove it all without removing something important that will break y= >our code? Or do you use conditional execution such as:=20 >>=20 >> if ($_ENV['DEGUG'] =3D=3D true) {=20 >> var_dump($data);=20 >> }=20 >>=20 >> If so what condition are you using? An environment variable like above, a= > constant defined elsewhere in a config file?=20 >>=20 >> I think conditional execution would be easier but question if having to c= >heck if the debug code can run would slow down a production server, but the= > question is how much overhead really does it take to check $_ENV or a cons= >tant...=20 >>=20 >> So I am curious to see how others deal with this. This abusive spamtroll came from comp.lang.php #168037 X-Received: by 2002:ac8:7d94:0:b0:3e6:970e:a405 with SMTP id c20- + 20020ac87d94000000b003e6970ea405mr3339752qtd.6.1682226412762; + Sat, 22 Apr 2023 22:06:52 -0700 (PDT) X-Received: by 2002:a05:620a:1006:b0:74e:4504:46da with SMTP id + z6-20020a05620a100600b0074e450446damr614083qkj.11.1682226412602; + Sat, 22 Apr + 2023 22:06:52 -0700 (PDT) Path: news.nk.ca!news.quux.org!1.us.feeder.erje.net!3.us.feeder.erje.net! + feeder.erje.net!border-1.nntp.ord.giganews.com!nntp.giganews.com!news- + out.google.com!nntp.google.com!postnews.google.com!google-groups. + googlegroups.com!not-for-mail Newsgroups: comp.lang.php Date: Sat, 22 Apr 2023 22:06:52 -0700 (PDT) In-Reply-To: <[email protected]> Injection-Info: google-groups.googlegroups.com; posting-host=82.131.76.206; + posting-account=JYCD-AoAAABJjYHTEug7bzEvKBag4Jpy NNTP-Posting-Host: 82.131.76.206 References: <[email protected]> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <[email protected]> Subject: Re: How do you handle debug code? Removing from production versus + conditional execution From: Angle <[email protected]> Injection-Date: Sun, 23 Apr 2023 05:06:52 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Lines: 23 Xref: news.nk.ca comp.lang.php:168037 Spamtrollers are trolls posting useless spam thinking it is content but are posting useless noise. Spamtrolls are newsgroup vandals! Thoses trolls are as bad as Donald Trump on Twitter. This makes https://groups.google.com/search/conversations?q=Depeer%20Google%20Groups Depeer Google groups Now!! Spamtroller , thou art rebuked in the Name of Yahweh the Father, Jesus the Son and the Holy Spirit for Jesus has all authority here and Satan has no authority here! -- Member - Liberal International This is [email protected] Ici [email protected] Yahweh, King & country!Never Satan President Republic!Beware AntiChrist rising! Look at Psalms 14 and 53 on Atheism https://www.empire.kred/ROOTNK?t=94a1f39b We are running a marathon we cannot win when we hide ourselves from who we are. -unknown Beware https://mindspring.com