3v4l.org

run code in 300+ PHP versions simultaneously
<!DOCTYPE html> <html> <body> <?php $even=0; $odd=0; $even_sum=0; $val_array = array(111, 56542, 893, 2354, 4545, 786, 9657, 3268, 4879, 9351, 7414, 4215, 3217, 1420); for ($i=0; $i < count($val_array); $i++) { if ($val_array[$i] % 2 == 0) { $even++; $even_sum=$even_sum + $val_array[$i]; } else { $odd++; } } echo "Total Even Numbers: " .$even."</br>"; echo "Total Odd Numbers: " .$odd."</br>"; echo $even_sum; ?> </body> </html>
Output for git.master, git.master_jit, rfc.property-hooks
<!DOCTYPE html> <html> <body> Total Even Numbers: 6</br>Total Odd Numbers: 8</br>71784 </body> </html>

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