3v4l.org

run code in 300+ PHP versions simultaneously
<?php $alfabeth = str_split('ABCDEFGHIJKLMNOPQRSTUVWXYZ'); $comets_by_group = [ 'HALLEY' => 'AMARELO', 'ENCKE' => 'VERMELHO', 'WOLF' => 'PRETO', 'KUSHIDA' => 'AZUL' ]; $sum_position_by_words = function($word) use($alfabeth) { $result = 0; foreach(str_split($word) as $letter) { if(in_array($letter, $alfabeth)) { $value_by_letter = ++array_keys($alfabeth, $letter)[0]; $result *= $value_by_letter; } } return $result; }; $complement = (php_sapi_name() != 'cli') ? "<br>\n" : "\n"; foreach($comets_by_group as $comet => $group) { if($sum_position_by_words($comet) % 45 == $sum_position_by_words($group) % 45){ printf("The group %s of comet %s" . $complement, $comet, $group); } }
Output for git.master, git.master_jit, rfc.property-hooks
The group HALLEY of comet AMARELO The group ENCKE of comet VERMELHO The group WOLF of comet PRETO The group KUSHIDA of comet AZUL

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