3v4l.org

run code in 300+ PHP versions simultaneously
<?php function is_palindrome(string $str): bool { return $str === implode('', array_reverse(grapheme_str_split($str))); } $palindrome = 'satanoscillatemymetallicsonatas'; $polar_bear = "\u{1f43b}\u{200d}\u{2744}\u{fe0f}"; $palindrome = str_replace('y', $polar_bear, $palindrome); echo "$palindrome is" . (is_palindrome($palindrome) ? "" : " not") . " a palindrome";
Output for git.master_jit, git.master
satanoscillatem🐻‍❄️metallicsonatas is a palindrome

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:
38.08 ms | 405 KiB | 5 Q