History log of /web-php/manual/index.php (Results 1 – 11 of 11)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 59c070f5 07-Dec-2023 Andreas Möller

Enhancement: Enable `blank_line_after_opening_tag` fixer (#875)


# 1b83fd7a 03-Jul-2022 Ayesh Karunaratne

Multiple micro-optimizations

* Replace `ob_get_contents();ob_clean()` with `ob_get_clean()`

`ob_get_clean()` is equivalent to `ob_get_contents()` followed by `ob_clean()`.

Multiple micro-optimizations

* Replace `ob_get_contents();ob_clean()` with `ob_get_clean()`

`ob_get_clean()` is equivalent to `ob_get_contents()` followed by `ob_clean()`.

* Replace `intval()` calls with `(int)` type cast

This is a micro-optimization because `intval()` is a function call, and the type cast is about 6 times fast.

* Replace `preg_replace` call that could be done with an `rtrim()` call

In `./error.php`, there is a `preg_replace('!/+$!', '', $URI);` call that essentially is equivalent to `rtrim()`, that both calls removing trailing slash characters in `$URI`.
The `rtim()` call is more legible and faster.

* Combine consecutive `str_replace` calls to a single `str_replace` call

* Use short ternary operator where possible

Improves code readability.

* Cascade various `else` statements where possible

Cleans up the code by removing unnecessary `else` blocks and moving the code to the parent context if the previous `if` block exits the function by either terminating the script, or with a `return` statement.

* Combine multiple `isset()` calls to a single `isset()`

`isset()` accepts multiple parameters and returns `true` only if all of the parameters are `isset`. It makes sense to combine multiple individual `isset` calls to a single call for better readability.

* Replace `for` loop with a `foreach` loop

* Remove unnecessary character escapes in regular expressions

Regular expression special characters are context-sensitive. For example, special characters such as `.` are not considered special within square braces (`[]`).
This removes several of such instances that certain characters are escaped, but it is not strictly necessary within the context. This improves the readability of the expression.

See more information at [PHP.Watch: Writing better Regular Expressions in PHP](https://php.watch/articles/php-regex-readability#reduce-escape)

* Remove unnecessary break statement

* Remove unnecessary PHP close tags

* Remove redundant JSON_ERROR_NONE check

Remove unnecessary `json_last_error() == JSON_ERROR_NONE` where the decoded object is inspected already.

Closes GH-603.

show more ...


# c0afd74b 31-May-2019 Sara Golemon

Swap uses of _SERVER[DOCUMENT_ROOT] for __DIR__

2/4 - Update remaining except archives/ and release/.


# 0f95b8c7 30-Jun-2018 Peter Kokot

Remove unused Git attributes ident

The $Id$ keywords were used in Subversion where they can be substituted
with filename, last revision number change, last changed date, and last
use

Remove unused Git attributes ident

The $Id$ keywords were used in Subversion where they can be substituted
with filename, last revision number change, last changed date, and last
user who changed it.

In Git this functionality is different and can be done with Git attribute
ident. These need to be defined manually for each file in the
.gitattributes file and are afterwards replaced with 40-character
hexadecimal blob object name which is based only on the particular file
contents.

This patch simplifies handling of $Id$ keywords by removing them since
they are not used anymore.

show more ...


# 6d0f6250 02-Aug-2003 Gabor Hojtsy

Fix includes, and make redirects based on the already computed
language value


# 75dd92ff 15-May-2003 Rasmus Lerdorf

Get rid of some more stat() syscalls by avoiding include_path stats when
we know the exact relative path to the files


# cddb324f 13-Dec-2001 jim winstead

silence is_dir tests that may fail


# 6b304c42 07-Jul-2001 jim winstead

hide the $MIRRORS array behind some access functions, for the most part


Revision tags: POST_MERGE_FROM_NEW_LOOK_2001_TAG_1
# 33c01cb6 08-Mar-2001 jim winstead

here goes nothing. the new php site look. let the torrent of
bitter and angry "i hate change" emails begin.


Revision tags: NEW_LOOK_2001_TAG_1, MERGE_FROM_NEW_LOOK_2001_TAG_1
# 6450ebf5 01-Mar-2001 jim winstead

fix a couple of dumb typos to fix default language of manual on mirrors


# 53bcd969 12-Jan-2001 jim winstead

bye, bye generated english manual. this should be exciting.