mammouth icon indicating copy to clipboard operation
mammouth copied to clipboard

Error Control Operator (@) vs this->

Open CezaryDanielNowak opened this issue 11 years ago • 1 comments

Hey, there is conflict in operator names

Valid PHP code: $fp = @fopen('path/to/file', 'ab');

mammouth code: fp = @fopen('path/to/file', 'ab') and it's compiled to $fp = $this->fopen('path/to/file', 'ab');

maybe @@fopen or (0)fopen or \@fopen notation for error control operator would be good ?

http://us3.php.net/manual/en/language.operators.errorcontrol.php

CezaryDanielNowak avatar Jan 12 '14 15:01 CezaryDanielNowak

try catch works fine; the @ is bad practice anyway http://derickrethans.nl/five-reasons-why-the-shutop-operator-should-be-avoided.html

dominic-ew avatar Jul 13 '15 09:07 dominic-ew