3v4l.org

run code in 300+ PHP versions simultaneously
<?php $long = '/connect=;;41.26.162.36;;192.168.0.100;;8081;; /connect=;;98.250.16.76;;192.168.0.24;;8080;; /connect=;;216.152.60.12;;192.168.1.103;;8090;; /connect=;;91.11.65.110;;192.168.1.3;;8081;;'; if (preg_match_all('/connect=;;([\d\.]+);;([\d\.]+);;(\d+);;/', $long, $matches, PREG_SET_ORDER)) { foreach($matches as $match) { list(,$ip1, $ip2, $port) = $match; /* Do stuff */ echo "{$ip1} => {$ip2}:{$port}\n"; } }
Output for 4.3.0 - 4.3.11, 4.4.0 - 4.4.9, 5.0.0 - 5.0.5, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.0 - 5.5.38, 5.6.0 - 5.6.30, 7.0.0 - 7.0.29, 7.1.0 - 7.1.25, 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.30, 8.2.0 - 8.2.25, 8.3.0 - 8.3.13
41.26.162.36 => 192.168.0.100:8081 98.250.16.76 => 192.168.0.24:8080 216.152.60.12 => 192.168.1.103:8090 91.11.65.110 => 192.168.1.3:8081

preferences:
84.74 ms | 420 KiB | 5 Q