Guest User

Untitled

a guest
Jun 21st, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. Does anyone have or know where I can find a list of the warnings and errors that a default PHP installation could possible spit out at run-time?
  2.  
  3. I'm trying to create some regexp that matches all errors, but there are a few different formats, for example:
  4. - Syntax errors... Parse error: syntax error, unexpected [T_STRING|END|T_VARIABLE|T_NUM_STRING|etc...] in ...
  5. - syntax error, unexpected '['
  6. - expecting ',' or ';'
  7. - "Using $this when not in object context in foo.php on line ..."
  8. - "failed to open stream: No such file or directory in foo.php on line ..."
  9. - "Fatal error: Function name must be a string in foo.php on line ..."
  10.  
  11. These are just a few off the top of my head. As you can see, there are a fair few different formats so creating some regexp could be quite difficult. Any suggestions?
Add Comment
Please, Sign In to add comment