Jump to content

@


unidox

Recommended Posts

@ suppresses errors. Can come in handy, but only recommend using in a production environment, after all testing is done, with a strong ability to debug, and a lot of error checking in your code. AKA - avoid using it unless you know what you're doing.

 

-> is referencing a method or variable within an object or class.

 

Example

 

<?php

class test {

    public function someMethod() {
        echo 'Hello world!';
    }

}

$obj = new test;

$obj->someMethod();

?>

Link to comment
https://forums.phpfreaks.com/topic/100724--/#findComment-515176
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.