3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a = array( 'roman', '.php', '_bnla', 'Juhu', 'Člutá', '_bla' ); var_dump(setlocale(LC_ALL, 'cs_CZ.utf8')); sort($a, SORT_LOCALE_STRING); var_dump($a);
based on HXdrM

Shows result from various feature-branches currently under review from the php developers. Contact me to have additional branches featured.

Output for Typed properties v2
bool(false) array(6) { [0]=> string(4) ".php" [1]=> string(4) "Juhu" [2]=> string(4) "_bla" [3]=> string(5) "_bnla" [4]=> string(5) "roman" [5]=> string(7) "Člutá" }
Output for Arrow functions
bool(false) array(6) { [0]=> string(4) ".php" [1]=> string(4) "Juhu" [2]=> string(4) "_bla" [3]=> string(5) "_bnla" [4]=> string(5) "roman" [5]=> string(7) "Člutá" }
Output for Object typehint
bool(false) array(6) { [0]=> string(4) ".php" [1]=> string(4) "Juhu" [2]=> string(4) "_bla" [3]=> string(5) "_bnla" [4]=> string(5) "roman" [5]=> string(7) "Člutá" }
Output for Array change keys
bool(false) array(6) { [0]=> string(4) ".php" [1]=> string(4) "Juhu" [2]=> string(4) "_bla" [3]=> string(5) "_bnla" [4]=> string(5) "roman" [5]=> string(7) "Člutá" }
Output for Lexical anon
bool(false) array(6) { [0]=> string(4) ".php" [1]=> string(4) "Juhu" [2]=> string(4) "_bla" [3]=> string(5) "_bnla" [4]=> string(5) "roman" [5]=> string(7) "Člutá" }

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