btwael / mammouth

Unfancy PHP
http://mammouth.boutglay.com
MIT License
214 stars 22 forks source link

Error Control Operator (@) vs this-> #14

Open CezaryDanielNowak opened 10 years ago

CezaryDanielNowak commented 10 years ago

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

dominic-ew commented 9 years ago

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