30
Salim
5y

"Don't use the debugger, just use var_dump( )"
- Project Manager

Comments
  • 6
    My favourite debug code, took me a couple of days to find where it was.
  • 4
  • 1
    @C0D4 y tho ?
  • 3
    @Salim apparently to identify performance issues.

    This wasn't mine.... a project I took over with this thing everywhere.
  • 1
    @C0D4 I feel you, I took over a project with controllers spanning over 5 KLOC
  • 2
    "just use printr"
  • 2
    I still use var_dump() because XDebug slows things down too much for me plus I have no idea how to use it 🤷‍♀️
  • 1
    Depends on use case and problem complexity.
    Sometimes you would need wall of var_dump()'s, sometimes debugger will be more annoying.

    More XP you have, the more accurately you know which tool you need in given instance of problem.
  • 2
    console.log. nobody?
  • 2
    @sandeepbalan

    And unpleasant silence happened...
  • 2
    @sandeepbalan we don't do that here 😏

    Warning: Use of undefined constant Console - assumed 'Console' in /path/to/file.php on line 3

    Warning: log() expects parameter 1 to be float, string given in /path/to/file.php on line 3
  • 1
    @C0D4

    Almost.. Almost!

    Warning isnt warning but rather "PHP Warning:"

    This one is more on-point

    PHP Warning: Use of undefined constant console - assumed 'console' (this will throw an Error in a future version of PHP) in /tmp/fun.php on line 3
    PHP Warning: log() expects parameter 1 to be float, string given in /tmp/fun.php on line 3

    Its funny how devs can literally emulate in brain exac contents of these errors...
  • 2
    @DubbaThony it's 6am. Close enough for this hour of the day.

    You know you've seen those errors way to many times when you can write them from memory.
  • 1
    @C0D4

    dw night owl ;)

    Ah, also the thingy that it will throw an error in future versions but that's added recently so no biggie ;)

    Still I love how we can predict exacly what message will be and we are usually mistaken by some typo or sth.
  • 2
    @DubbaThony not a night owl. Not long dragged myself out of bed.
  • 1
    @C0D4 aaah, early bird than.

    Sorry ;)

    Anyway I fully understand that you are still booting and need some caff flowing before proper script execution 😂
  • 2
    @DubbaThony mm coffee sounds good, currently stuck at a prompt

    -> Insert coffee to continue.

    Thats a good 1.5-2hours away by the time I get to work.

    #uselessTrainWorks😣
  • 0
    @C0D4thats my bios screen. When I POST in morning im like hard stuck before coffee so i can 100% relate. Its 22:43 for me btw
  • 2
    @DubbaThony 15-20 more min and I'll have that big cup of joe!!
    I just need to not have a system freeze in the meantime.
  • 1
    @C0D4

    Wait its not frozen?

    Apparently your system can work coffeelessly, my system will be in bootloop until caff is provided
  • 2
    @DubbaThony background processors are running, albeit slowly.

    It's like running Windows 10 on a single core processor and 512mb ram.
    It's having a bad time but surviving 😅
  • 0
    @C0D4

    So for me better analogy is literally fuel and car, without it you can turn on the lights and stuff but it wont get you anywhere.
  • 2
    @DubbaThony that works too, just put it into gear and let it roll down a hill.
  • 1
    @C0D4

    That is beeing from bed to floor? 😂
Add Comment