3v4l.org

run code in 300+ PHP versions simultaneously
<?php function _unicode_caseflip($matches) { return $matches[0][0] . chr(ord($matches[0][1]) ^ 32); } function drupal_strtolower($text, $multibyte_unicode) { if ($multibyte_unicode) { return mb_strtolower($text); } else { // Use C-locale for ASCII-only lowercase $text = strtolower($text); // Case flip Latin-1 accented letters $text = preg_replace_callback('/\xC3[\x80-\x96\x98-\x9E]/', '_unicode_caseflip', $text); return $text; } } $arr = []; $arr[] = drupal_strtolower(TRUE, TRUE); $arr[] = drupal_strtolower(TRUE, FALSE); $arr[] = drupal_strtolower(FALSE, TRUE); $arr[] = drupal_strtolower(FALSE, FALSE); $arr[] = (bool)drupal_strtolower(TRUE, TRUE); $arr[] = (bool)drupal_strtolower(TRUE, FALSE); $arr[] = (bool)drupal_strtolower(FALSE, TRUE); $arr[] = (bool)drupal_strtolower(FALSE, FALSE); var_export($arr);
Output for git.master, git.master_jit, rfc.property-hooks
array ( 0 => '1', 1 => '1', 2 => '', 3 => '', 4 => true, 5 => true, 6 => false, 7 => false, )

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.64 ms | 401 KiB | 8 Q