Skip to content

u/rolldeep

In this archive from Nov 2010 to Oct 2021

2
posts
33
comments
0
media
69
score

I think it's a problem with PHPers who have started with PHP as their first language and built up from there without the background and strict requirements of another OO language.

Aye, your way is better IMO.

1 points

This is the right way to do it. What you're doing will work but it's not best practice and anyone else picking up your code will be scratching their head for a minute.

Just make the authorisation properties private.

1 points

This is really good advice. Seeing things from a different perspective is a good idea. Also take a look into improving the quality of your work and ensuring quality standards with unit testing/TDD and other PHPUnit tools. Do some investigation into continuous integration servers (Jenkins is IMO the best). jenkins-php.org.

Also I hate to put it this way but getting into a "real" programming language like Python would be a good move and make you look at PHP differently.

1 points

PHP's mail function will let you send emails. You can send HTML emails with it but it's quite tricky. There's some pointers on PHP.net's mail function page.

If you're happy with using objects in PHP PHPMailer is really good and makes sending HTML emails a lot easier.

1 points

I've never understood the less lines is good thing. To me, if it doesn't affect performance then readability and maintainability is infinitely more important.

4 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.