3v4l.org

run code in 300+ PHP versions simultaneously
<?php $in = "0 0 0 0 0.5230792 0 0 0 0.4769208 0 0 0 "; $data = preg_split("/[\s\n]/",$in); $count = count($in); $length = 1000; $size = $length/$count; $height = 100; print "<svg width='$length' height='$height'>"; $x = 0; foreach ($data as $line) { $inte = floor($line*255); print "<rect x='$x' y='0' width='$size' height='$height' style='fill:rgb($inte,$inte,$inte);stroke-width:1;stroke:white' />"; $x = $x+$size; } print "</svg>"; ?>
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, string given in /in/uXJX4:6 Stack trace: #0 {main} thrown in /in/uXJX4 on line 6
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:
50.6 ms | 401 KiB | 8 Q