3v4l.org

run code in 300+ PHP versions simultaneously
<?php $strings = [ 'Vanilla', 'Curaçao', 'Vanilla Ice', "Vanilla\nIce", 'वैनिला', 'فانيليا', 'དྲི་ཞིམ་ལྡན་པའི་རྩྭ།', '12345!?', "\t", " ", ]; function is_utf8_printable($string): bool { return (bool) preg_match('~^[[:print:]]+$~u', $string); } $printable = array_map(function($string) { // $is = ctype_print($string); $is = is_utf8_printable($string); return [$string => $is]; }, $strings); var_dump($printable);
Output for git.master, git.master_jit, rfc.property-hooks
array(10) { [0]=> array(1) { ["Vanilla"]=> bool(true) } [1]=> array(1) { ["Curaçao"]=> bool(true) } [2]=> array(1) { ["Vanilla Ice"]=> bool(true) } [3]=> array(1) { ["Vanilla Ice"]=> bool(false) } [4]=> array(1) { ["वैनिला"]=> bool(true) } [5]=> array(1) { ["فانيليا"]=> bool(true) } [6]=> array(1) { ["དྲི་ཞིམ་ལྡན་པའི་རྩྭ།"]=> bool(true) } [7]=> array(1) { ["12345!?"]=> bool(true) } [8]=> array(1) { [" "]=> bool(false) } [9]=> array(1) { [" "]=> bool(true) } }

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:
150.25 ms | 407 KiB | 5 Q