Skip to content

reference:(root):includes:backwards compatibility.php

Aaron Junker edited this page Apr 24, 2021 · 1 revision

File (root)/includes/backwards compatibility.php

This file contains 3 functions of PHP 8, that are used in USOC. These are also defined here so that USOC can be used with PHP 7.4.

(root)/includesclass.inc.php includes this file, so it's available everywhere inside of USOC.

This file gets removed in the summer of 2021.

Functions

The file checks for the existence of the function str_contains(). If this function isn't available the following function are getting defined:

  • str_contains(string $haystack, string $needle):bool
  • str_starts_with(string $haystack, string $needle):bool
  • str_ends_with(string $haystack, string $needle):bool
Clone this wiki locally