3v4l.org

run code in 300+ PHP versions simultaneously
<?php function decodeText($texts) { if(is_array($texts)) { $encoded = array(); foreach($texts as $key => $text) { var_dump(is_array($key)); var_dump(is_array($text)); if (!is_array($text)) { $encoded[$key] = utf8_decode($text); } else { 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
bool(false) bool(false) Deprecated: Function utf8_decode() is deprecated in /in/RQSj0 on line 14 bool(false) bool(true) bool(false) bool(false) Deprecated: Function utf8_decode() is deprecated in /in/RQSj0 on line 14 bool(false) bool(false) Deprecated: Function utf8_decode() is deprecated in /in/RQSj0 on line 14 array(1) { ["test"]=> string(6) "��l�" } Warning: Undefined variable $text in /in/RQSj0 on line 24 Deprecated: Function utf8_decode() is deprecated in /in/RQSj0 on line 24 Deprecated: utf8_decode(): Passing null to parameter #1 ($string) of type string is deprecated in /in/RQSj0 on line 24 string(0) ""

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:
43.37 ms | 402 KiB | 8 Q