3v4l.org

run code in 300+ PHP versions simultaneously
<?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.4.45, 5.5.0 - 5.5.37, 5.6.0 - 5.6.28, 7.0.0 - 7.0.20, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.27, 8.2.0 - 8.2.17, 8.3.0 - 8.3.4
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.0.5, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17, 5.3.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.3.11, 4.4.0 - 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>

preferences:
281.93 ms | 402 KiB | 388 Q