3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a = []; $a[0] = "<table style='color:; text-align: left;'> <tr> <td>Processor"; $a[1] = "</td> <td> Intel Core 2 Duo - E8400"; $a[2] = "</td> </tr> <tr> <td> Clockspeed"; $a[3] = "</td> <td> 3.0 GHz"; $a[4] = "</td> </tr> <tr> <td> Memory"; $a[5] = "</td> <td> 4 GB"; $a[6] = "</td> </tr> <tr> <td> Harddisk"; $a[7] = "</td> <td> 250 GB"; $a[8] = "</td> </tr> <tr> <td> Video-adapter"; $a[9] = "</td> <td> VGA, Display"; $a[10] = "</td> </tr> <tr> <td> Netwerkcard"; $a[11] = "</td><td> 1000 mbps LAN"; $a[12] = "</td> </tr> <tr> <td> Optical drive"; $a[13] = "</td><td> DVD-Rewriter"; $a[14] = "</td> </tr> <tr> <td> Operating system"; $a[15] = "</td><td> Windows7 or 10 Pro"; $a[16] = "</td> </tr> <tr> <td> Warranty"; $a[17] = "</td><td> 2 years</td></tr></table>"; foreach ($a as &$e) { $e = trim($e); } $joined = join($a); $stripped = strip_tags($joined,"<td>"); $replaced = str_replace(["<td>","</td>"],["*",""],$stripped); $arr = explode("*",$replaced); array_shift($arr); print_r($arr);
Output for 5.6.0 - 5.6.30, hhvm-3.18.5 - 3.22.0, 7.0.0 - 7.3.0rc3
Array ( [0] => Processor [1] => Intel Core 2 Duo - E8400 [2] => Clockspeed [3] => 3.0 GHz [4] => Memory [5] => 4 GB [6] => Harddisk [7] => 250 GB [8] => Video-adapter [9] => VGA, Display [10] => Netwerkcard [11] => 1000 mbps LAN [12] => Optical drive [13] => DVD-Rewriter [14] => Operating system [15] => Windows7 or 10 Pro [16] => Warranty [17] => 2 years )