3v4l.org

run code in 300+ PHP versions simultaneously
<?php $js = ''; $resultset = [ ["title" => "Cash", "value" => 40, "color" => "#2C3E50"], ["title" => "Fixed Interest", "value" => 8, "color" => "#FE4400"], ["title" => "Property", "value" => 24, "color" => "#018AB6"], ["title" => "Australian shares", "value" => 16, "color" => "#FFF100"], ["title" => "Intl. shares", "value" => 12, "color" => "#D7DADB"] ]; $json = json_encode($resultset); $piechart_id = "piechart1"; // this seems sensible if inside of a loop $js .= "$('#{$piechart_id}').drawPieChart({$json})"; echo $js;
Output for git.master, git.master_jit, rfc.property-hooks
$('#piechart1').drawPieChart([{"title":"Cash","value":40,"color":"#2C3E50"},{"title":"Fixed Interest","value":8,"color":"#FE4400"},{"title":"Property","value":24,"color":"#018AB6"},{"title":"Australian shares","value":16,"color":"#FFF100"},{"title":"Intl. shares","value":12,"color":"#D7DADB"}])

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:
55.2 ms | 401 KiB | 8 Q