3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(-1); $data = array ( 'tram B' => array ( 0 => array ( 'name' => 'Ile Verte' , 'distance' => 298, 'stationID' => 762, ), 1 => array ( 'name' => 'La Tronche Hôpital' , 'distance' => 425, 'stationID' => 771, ), ), 16 => array ( 0 => array ( 'name' => 'Bastille', 'distance' => 531, 'stationID' => 397 ), 1 => array ( 'name' => 'Xavier Jouvin', 'distance' => 589, 'stationID' => 438, ), ), ); $data['tram B'][1]['name'] = iconv('UTF8', 'ISO-8859-1', $data['tram B'][1]['name']); var_dump( mb_detect_order(), mb_detect_encoding($data['tram B'][1]['name']), mb_detect_encoding($data['tram B'][1]['name'], array('ISO-8859-1', 'UTF-8')), json_encode($data) );
Output for git.master, git.master_jit, rfc.property-hooks
Warning: iconv(): Wrong encoding, conversion from "UTF8" to "ISO-8859-1" is not allowed in /in/i7WEC on line 37 array(2) { [0]=> string(5) "ASCII" [1]=> string(5) "UTF-8" } string(5) "ASCII" string(10) "ISO-8859-1" string(224) "{"tram B":[{"name":"Ile Verte","distance":298,"stationID":762},{"name":false,"distance":425,"stationID":771}],"16":[{"name":"Bastille","distance":531,"stationID":397},{"name":"Xavier Jouvin","distance":589,"stationID":438}]}"

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:
56.46 ms | 406 KiB | 5 Q