3v4l.org

run code in 300+ PHP versions simultaneously
<?php $allIntlCharConstants = (new ReflectionClass('IntlChar'))->getConstants(); $constants = array_filter($allIntlCharConstants, function($name){ return strpos('CHAR_CATEGORY_', $name) !== false; }); IntlChar::enumCharTypes(function($start, $end, $type) { printf("U+%04x through U+%04x are in category %d\n", $start, $end, array_search($constants, $type)); });

preferences:
40.54 ms | 402 KiB | 5 Q