3v4l.org

run code in 300+ PHP versions simultaneously
<?php $content = file_get_contents('http://www.sparkfun.com/commerce/product_info.php?products_id=9279'); preg_match('#<tr><th>(.*)</th> <td><b>price</b></td></tr>#', $content, $match); $price = $match[1]; preg_match('#<input type="hidden" name="quantity_on_hand" value="(.*?)">#', $content, $match); $in_stock = $match[1]; echo "Price: $price - Availability: $in_stock\n"; ?>
Output for git.master, git.master_jit, rfc.property-hooks
Warning: file_get_contents(): php_network_getaddresses: getaddrinfo for www.sparkfun.com failed: System error in /in/A9bOF on line 3 Warning: file_get_contents(http://www.sparkfun.com/commerce/product_info.php?products_id=9279): Failed to open stream: php_network_getaddresses: getaddrinfo for www.sparkfun.com failed: System error in /in/A9bOF on line 3 Warning: Undefined array key 1 in /in/A9bOF on line 6 Warning: Undefined array key 1 in /in/A9bOF on line 9 Price: - Availability:

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:
36.99 ms | 402 KiB | 8 Q