Tutorials Point

  Learning PHP
  Advanced PHP
  PHP Function Reference
  PHP Useful Resources
  Selected Reading

Copyright © 2014 by tutorialspoint

  Home     References     Discussion Forums     About TP  

PHP Function sql_regcase()




string sql_regcase (string string)

Definition and Usage

The sql_regcase() function can be thought of as a utility function, converting each character in the input parameter string into a bracketed expression containing two characters.

If the alphabetical character has both an uppercase and a lowercase format, the bracket will contain both forms; otherwise the original character will be repeated twice.

Return Value

  • Returns a string of bracketed expression alongwith convered character.


Following is the piece of code, copy and paste this code into a file and verify the result.


$version = "php 4.0";
print sql_regcase($version);


This will produce following result:

[Pp] [Hh] [Pp] [ ] [44] [..] [00]

previous Printer Friendly