3v4l.org

run code in 300+ PHP versions simultaneously
<?php function getHighest($values = array()) { return end(sort($values)); } $array = array( 'a' => '123', 'b' => '119', 'c' => '123', 'd' => '8', ); $highest = getHighest($array);
Output for git.master, git.master_jit
Notice: Only variables should be passed by reference in /in/ak6of on line 6 Fatal error: Uncaught TypeError: end(): Argument #1 ($array) must be of type array, bool given in /in/ak6of:6 Stack trace: #0 /in/ak6of(6): end(true) #1 /in/ak6of(16): getHighest(Array) #2 {main} thrown in /in/ak6of on line 6
Process exited with code 255.
Output for rfc.property-hooks
Notice: Only variables should be passed by reference in /in/ak6of on line 6 Fatal error: Uncaught TypeError: end(): Argument #1 ($array) must be of type array, true given in /in/ak6of:6 Stack trace: #0 /in/ak6of(6): end(true) #1 /in/ak6of(16): getHighest(Array) #2 {main} thrown in /in/ak6of 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:
55.87 ms | 401 KiB | 8 Q