3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Proof of Nonsense by Stephan Schmitz @ code.eyecatch-up.de // Complex and inefficient way of a php 'hello world' output function subval_sort($a,$subkey) { foreach($a as $k=>$v) { $b[$k] = strtolower($v[$subkey]); } asort($b); foreach($b as $key=>$val) { $c[] = $a[$key]; } return $c; } $a = array('a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'); $p = array('4', '12', '18', '15', '23', '15', '12', '12', '5', '8'); $ls = ''; foreach ($p as $l){ $pa = $l - 1; $ls .= $a[$pa].'|'; } $ls = substr($ls, 0, -1); $ls = explode('|', $ls); $i = count($ls); $o = array(); foreach ($ls as $l){ $o[] = array( 'l' => $l, 'p' => $i ); $i = $i - 1; } $o = subval_sort($o,'p'); $ohw = ''; foreach ($o as $l){ $ohw .= $l['l']; } $oh = substr($ohw, 0, -5); $ow = strrev($ohw); $ow = substr($ow, 0, -5); $ow = strrev($ow); $oh = ucfirst($oh); $ow = ucfirst($ow); echo $oh; echo ' '; echo $ow;
Output for git.master, git.master_jit, rfc.property-hooks
Hello World

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