3v4l.org

run code in 300+ PHP versions simultaneously
<?php function decodeText($texts) { if(is_array($texts)) { $encoded = array(); foreach($texts as $key => $text) { if (!is_array($text )) { $encoded[$key] = utf8_decode($text); } else { $this->decodeText($text); } } } else { $encoded = utf8_decode($text); } return $encoded; } $smth = array('test' => 'ääõölö', 'test2' => array('öüõü', 'dasd212äöäöä' )); $smth = decodeText($smth); var_dump($smth); var_dump(decodeText('köõöõüpõ'));
Output for git.master, git.master_jit, rfc.property-hooks
Deprecated: Function utf8_decode() is deprecated in /in/5DcHY on line 12 Fatal error: Uncaught Error: Using $this when not in object context in /in/5DcHY:16 Stack trace: #0 /in/5DcHY(28): decodeText(Array) #1 {main} thrown in /in/5DcHY on line 16
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:
36.81 ms | 401 KiB | 8 Q