3v4l.org

run code in 500+ PHP versions simultaneously
<?php $data = <<<EOT <stuff> <totalNetValue>28.32</totalNetValue> <totalVatAmount>6.80</totalVatAmount> </stuff> EOT; $s = simplexml_load_string($data); $sgn = -1.0; $net = $sgn * $s->totalNetValue; $vat = $sgn * $s->totalVatAmount; echo "net=$net vat=$vat s->totalNetValue=$s->totalNetValue s->totalVatAmount=$s->totalVatAmount gettype(s->totalNetValue)=".gettype($s->totalNetValue)."<br>";
Output for rfc.property-hooks, git.master_jit, git.master
net=-28.32 vat=-6.8 s->totalNetValue=28.32 s->totalVatAmount=6.80 gettype(s->totalNetValue)=object<br>

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:
54.49 ms | 2725 KiB | 4 Q