3v4l.org

run code in 300+ PHP versions simultaneously
<?php function _CC($amt,$from=''){ global $CURRENCY; if($CURRENCY['conv']===1){ $from=(!empty($from) ? $from : 'USD'); if(empty($CURRENCY[$from])){ $c=file_get_contents('http://www.google.com/ig/calculator?hl=en&q=1'.$from.'=?'.LOCAL_CURRENCY); $j=json_decode(preg_replace('/({|,)([a-z]+): /','$1"$2": ',$c)); preg_match('/\d+(?:\.\d+)?/',$j->{'rhs'},$res); $CURRENCY[$from] = $res[0]; } return bcmul($amt,$CURRENCY[$from],2); }else{ return $amt; } } $CURRENCY['conv']=1; echo _CC('1.11');
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught Error: Undefined constant "LOCAL_CURRENCY" in /in/DaA9v:7 Stack trace: #0 /in/DaA9v(18): _CC('1.11') #1 {main} thrown in /in/DaA9v on line 7
Process exited with code 255.

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.3 ms | 401 KiB | 8 Q