3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $output = '<div class="center"> <table border="0" cellpadding="3" width="600"> <tr><td class="e">ctype functions </td><td class="v">enabled </td></tr> </table><br /> <table></table>'; $output1 = preg_replace('#<table[^>]*>#', '<table class="table table-striped adminlist">', $output); echo $output[1][0] . PHP_EOL . PHP_EOL . $output1;
Output for 5.4.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
d <div class="center"> <table class="table table-striped adminlist"> <tr><td class="e">ctype functions </td><td class="v">enabled </td></tr> </table><br /> <table class="table table-striped adminlist"></table>
Output for 5.0.0 - 5.3.29
Fatal error: Cannot use string offset as an array in /in/CtcZn on line 8
Process exited with code 255.
Output for 4.3.10 - 4.4.9
<div class="center"> <table class="table table-striped adminlist"> <tr><td class="e">ctype functions </td><td class="v">enabled </td></tr> </table><br /> <table class="table table-striped adminlist"></table>
Output for 4.3.0 - 4.3.9
Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/CtcZn on line 8 Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/CtcZn on line 8 PHP_EOLPHP_EOL<div class="center"> <table class="table table-striped adminlist"> <tr><td class="e">ctype functions </td><td class="v">enabled </td></tr> </table><br /> <table class="table table-striped adminlist"></table>