3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $path = null; $list = array('k1' => 'f1.txt', 'k2' => 'f2.txt', 'k3' => 'f3.txt', 'k4' => 'f4.txt'); $ipsStr = ';192.168.0.2;192.168.1.2;192.168.2.2;'; #$ipsStr = ''; $ips = explode(';', trim($ipsStr, ';')); /* $ipString = '<ul>'; if (is_array($ips)) { foreach ($ips as $ip) { $ipString .= '<li>' . $ip . '</li>'; } } $ipString .= '<ul>'; return $ipString; */ var_dump($ipsStr);
based on IG8o4
Output for 5.6.0 - 5.6.30, hhvm-3.15.4, 7.0.0 - 7.3.0alpha1
string(37) ";192.168.0.2;192.168.1.2;192.168.2.2;"