3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $string = '<b>AAAAA</b>'; var_dump( preg_replace('/<[^>]*>'/g, '*', $string) );
Output for 7.1.0
Notice: Use of undefined constant g - assumed 'g' in /in/K8Fe7 on line 4 Warning: A non-numeric value encountered in /in/K8Fe7 on line 4 Warning: A non-numeric value encountered in /in/K8Fe7 on line 4 Warning: Division by zero in /in/K8Fe7 on line 4 Warning: preg_replace(): Delimiter must not be alphanumeric or backslash in /in/K8Fe7 on line 4 NULL
Output for 7.0.0 - 7.0.14
Notice: Use of undefined constant g - assumed 'g' in /in/K8Fe7 on line 4 Warning: Division by zero in /in/K8Fe7 on line 4 Warning: preg_replace(): Delimiter must not be alphanumeric or backslash in /in/K8Fe7 on line 4 NULL
Output for 4.3.0 - 4.3.10, hhvm-3.10.0 - 3.12.0
Notice: Use of undefined constant g - assumed 'g' in /in/K8Fe7 on line 4 Warning: Division by zero in /in/K8Fe7 on line 4 Warning: Empty regular expression in /in/K8Fe7 on line 4 NULL
Output for 4.3.11 - 5.6.28
Notice: Use of undefined constant g - assumed 'g' in /in/K8Fe7 on line 4 Warning: Division by zero in /in/K8Fe7 on line 4 Warning: preg_replace(): Empty regular expression in /in/K8Fe7 on line 4 NULL