|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2007-04-30 10:46 UTC] derick@php.net
[2007-04-30 11:17 UTC] rene dot stabingis at gmail dot com
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 15:00:01 2025 UTC |
Description: ------------ This code should delete all non-alphanumeric signs (except spaces). If you have latin special chars like "?", on the linux machine they are deleted. On a win environment using same php version they are kept as alnum. The deb machine runs with ISO-8859-1 charset. Reproduce code: --------------- $somePhrase = 'i don\'t know why, but many people know ?ber'; echo preg_replace('/[^[:alnum:][:space:]]/', '', $somePhrase); Expected result: ---------------- i dont know why but many people know ?ber Actual result: -------------- i dont know why but many people know ber