3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function array_filter_strlen($a, $l) { preg_replace('.{0, 3}', '', $a); var_dump($a); } print_r(array_filter_strlen(array('привет', 'мир', 'и', 'cyberforum'), 3));
Output for 4.3.11 - 5.6.28, 7.0.0 - 7.1.0
Warning: preg_replace(): No ending delimiter '.' found in /in/cGMIF on line 4 Warning: preg_replace(): No ending delimiter '.' found in /in/cGMIF on line 4 Warning: preg_replace(): No ending delimiter '.' found in /in/cGMIF on line 4 Warning: preg_replace(): No ending delimiter '.' found in /in/cGMIF on line 4 array(4) { [0]=> string(12) "привет" [1]=> string(6) "мир" [2]=> string(2) "и" [3]=> string(10) "cyberforum" }
Output for hhvm-3.10.0 - 3.12.0
Warning: No ending delimiter '.' found: [.{0, 3}] in /in/cGMIF on line 4 Warning: No ending delimiter '.' found: [.{0, 3}] in /in/cGMIF on line 4 Warning: No ending delimiter '.' found: [.{0, 3}] in /in/cGMIF on line 4 Warning: No ending delimiter '.' found: [.{0, 3}] in /in/cGMIF on line 4 array(4) { [0]=> string(12) "привет" [1]=> string(6) "мир" [2]=> string(2) "и" [3]=> string(10) "cyberforum" }
Output for 4.3.0 - 4.3.10
Warning: No ending delimiter '.' found in /in/cGMIF on line 4 Warning: No ending delimiter '.' found in /in/cGMIF on line 4 Warning: No ending delimiter '.' found in /in/cGMIF on line 4 Warning: No ending delimiter '.' found in /in/cGMIF on line 4 array(4) { [0]=> string(12) "привет" [1]=> string(6) "мир" [2]=> string(2) "и" [3]=> string(10) "cyberforum" }