Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.3.x will end 7 October 2024 (12 months).
  • Bug fixes for security issues in 4.3.x will end 21 April 2025 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.2.x is supported too.

Copyright (c) 2016 - 2017 Paragon Initiative Enterprises. Copyright (c) 2014 Steve "Sc00bz" Thomas (steve at tobtu dot com) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

File Size: 97 lines (3 kb)
Included or required: 2 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

Binary:: (2 methods):
  safeStrlen()
  safeSubstr()


Class: Binary  - X-Ref

Class Binary

Binary string operators that don't choke on
mbstring.func_overload

safeStrlen($str)   X-Ref
Safe string length

param: string $str
return: int

safeSubstr($str,$start = 0,$length = \null)   X-Ref
Safe substring

param: string $str
param: int $start
param: int $length
return: string