3v4l.org

run code in 300+ PHP versions simultaneously
<?php $url1 = "http://bazalekow.mp.pl/leki/item.html?id=22134"; $url2 = "http://bazalekow.mp.pl/leki/item.html?id=8364"; $url = file_get_contents($url2); preg_match_all("/<td class=\'postac\'>([A-Z]+[^<]*)<\/td>/s",$url, $nazwy); preg_match_all("/<td class=\'postac\'>([a-z]+[^<]*)<\/td>/s",$url, $postacie); preg_match_all("/<td>([^<]*)<\/td>\s*<td class=\'cena\'>/is",$url, $producenci); preg_match_all("/<td class=\'cena\'>(.*?)<\/td>/is",$url, $ceny); echo count($ceny); for($i=0; $i<count($nazwy); $i++){ $nazwa = $nazwy[1][$i]; $postac = $postacie[1][$i]; $producent = $producenci[1][$i]; $cena = $ceny[1][$i]; $sql[] = "('$nazwa', '$postac', '$producent', '$cena')"; } print_r($sql); //print_r($postacie); ?>
Output for git.master, git.master_jit, rfc.property-hooks
Warning: file_get_contents(): php_network_getaddresses: getaddrinfo for bazalekow.mp.pl failed: System error in /in/Ybl2e on line 4 Warning: file_get_contents(http://bazalekow.mp.pl/leki/item.html?id=8364): Failed to open stream: php_network_getaddresses: getaddrinfo for bazalekow.mp.pl failed: System error in /in/Ybl2e on line 4 2 Warning: Undefined array key 0 in /in/Ybl2e on line 14 Warning: Undefined array key 0 in /in/Ybl2e on line 15 Warning: Undefined array key 0 in /in/Ybl2e on line 16 Warning: Undefined array key 0 in /in/Ybl2e on line 17 Warning: Undefined array key 1 in /in/Ybl2e on line 14 Warning: Undefined array key 1 in /in/Ybl2e on line 15 Warning: Undefined array key 1 in /in/Ybl2e on line 16 Warning: Undefined array key 1 in /in/Ybl2e on line 17 Array ( [0] => ('', '', '', '') [1] => ('', '', '', '') )

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
44.52 ms | 403 KiB | 8 Q