3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test{ const AB♥ = "alphabet"; } $rc = new ReflectionClass("Test"); $t = array_keys( $rc->getConstants())[0]; if ( mb_substr($t,-1,1,"utf-8") == "\xe2\x99\xa5" ) { var_dump($t,mb_substr($t,-1,1,"utf-8"), "\xe2\x99\xa5"); echo "heart: ",json_decode('"' . "\u2665" . '"'); //trigger_error("heart symbol is disallowed",E_USER_ERROR); }
Output for git.master, git.master_jit, rfc.property-hooks
string(5) "AB♥" string(3) "♥" string(3) "♥" heart: ♥

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:
53.26 ms | 401 KiB | 8 Q