3v4l.org

run code in 200+ PHP versions simultaneously
<?php function IsCasiPalindromo($str){ $count = 0; $idx1 = 0; $idx2 = strlen($str)-1; while($idx1 <= $idx2){ if($str[$idx1] != $str[$idx2]){ $count++; echo 'false'; } $idx1++; $idx2--; } return true; } echo IsCasiPalindromo("abccba") . '<br>'; echo IsCasiPalindromo("abccbx") . '<br>'; echo IsCasiPalindromo("abccfg") . '<br>';
based on K0PEU

Shows result from various feature-branches currently under review from the php developers. Contact me to have additional branches featured.

Output for branch php-master
1<br>false1<br>falsefalse1<br>
Output for branch php-master+opcache
1<br>false1<br>falsefalse1<br>
Output for branch php-master+jit
1<br>false1<br>falsefalse1<br>
Output for Typed properties v2
1<br>false1<br>falsefalse1<br>
Output for Arrow functions
1<br>false1<br>falsefalse1<br>
Output for Object typehint
1<br>false1<br>falsefalse1<br>
Output for Array change keys
1<br>false1<br>falsefalse1<br>
Output for Lexical anon
1<br>false1<br>falsefalse1<br>

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