3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $characters = ["A", "a", "Φ", "φ", "1", ord("a")]; foreach ($characters as $character) { var_dump(IntlChar::charage($character)); } ?>
based on O9BIR
Output for 7.0.0 - 7.0.4, 7.0.6 - 7.2.0
array(4) { [0]=> int(1) [1]=> int(1) [2]=> int(0) [3]=> int(0) } array(4) { [0]=> int(1) [1]=> int(1) [2]=> int(0) [3]=> int(0) } array(4) { [0]=> int(1) [1]=> int(1) [2]=> int(0) [3]=> int(0) } array(4) { [0]=> int(1) [1]=> int(1) [2]=> int(0) [3]=> int(0) } array(4) { [0]=> int(1) [1]=> int(1) [2]=> int(0) [3]=> int(0) } array(4) { [0]=> int(1) [1]=> int(1) [2]=> int(0) [3]=> int(0) }
Output for 7.0.5
Fatal error: Uncaught Error: Class 'IntlChar' not found in /in/ZVGYk:4 Stack trace: #0 {main} thrown in /in/ZVGYk on line 4
Process exited with code 255.
Output for 5.4.2 - 5.6.28
Fatal error: Class 'IntlChar' not found in /in/ZVGYk on line 4
Process exited with code 255.
Output for 5.3.17 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/ZVGYk on line 2
Process exited with code 255.