3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $tvPrograms = array ( 'Simpsons', 'Southpark', 'Disney Time' ); $data = '<tr><td>%col%</td><td>%col%</td><td>%col%</td></tr>'; $htmlDoc = preg_replace ( '/%col%/', $tvPrograms, $data ); print $htmlDoc;
Output for 5.2.0 - 5.6.28, 7.0.0 - 7.1.0
Warning: preg_replace(): Parameter mismatch, pattern is a string while replacement is an array in /in/iYIQ5 on line 4
Output for hhvm-3.10.0 - 3.12.0
Warning: Parameter mismatch, pattern is a string while replacement is an array in /in/iYIQ5 on line 4
Output for 4.3.2 - 5.1.6
Warning: preg_replace(): Parameter mismatch, pattern is a string while replacement in an array. in /in/iYIQ5 on line 4
Output for 4.3.0 - 4.3.1
<tr><td></td><td></td><td></td></tr>