kassner / log-parser

PHP Web Server Log Parser Library
Apache License 2.0
339 stars 64 forks source link

Fix constructor bug where format is not used #25

Closed Sophist-UK closed 7 years ago

Sophist-UK commented 7 years ago

To be honest I am not sure how the unit tests passed with this bug.

kassner commented 7 years ago

@Sophist-UK I'm not sure if I am following. Aren't both the same thing?

http://docs.php.net/manual/en/language.operators.comparison.php#language.operators.comparison.ternary

Expression expr1 ?: expr3 returns expr1 if expr1 evaluates to TRUE, and expr3 otherwise.

Sophist-UK commented 7 years ago

Yes - they are the same thing - I was not aware of this style of ternary.

I guess my version is more readable, so I will not close this myself - feel free to merge or close as you see fit.