Late Post: PHP self::(hate)

** Referring to the GTheatre Project **

While working on the Account Page for the project I kept running into the error ‘undefined function’. At first, I thought that it was because I had made a typo so after multiple Ctrl+C, Ctrl+V sessions I realized that I’m probably going to go crazy from this project.

Screen Shot 2017-03-23 at 12.01.47 PM.png

The issue: PHP even when the function is defined in the same class, requires the keyword ‘self’, not to be confused with Self – the programming language.

The fix:

Screen Shot 2017-04-16 at 2.07.56 PM

So for those who aren’t familiar, Ruby does this too.

Again, this is something you probably would find on SlackOverflow after a quick Google search but just a heads up for the project.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s