3v4l.org

run code in 300+ PHP versions simultaneously
<?php $res = ''; $attributes = explode("||", 'черный==0||зеленый==0||салатовый==0||полированный==0||оранжевый==0||красный==0||белый==0'); $attributes1 = 'черный==0||зеленый==0||салатовый==0||полированный==0||оранжевый==0||красный==0||белый==0'; foreach ($attributes as $value_attribute) { if (!empty($value_attribute)) { //$res .= $value_attribute.'-'; $attributes_delimiter = explode("==", $value_attribute); foreach ($attributes_delimiter as $value_attribute_delimiter) { $res .= $value_attribute_delimiter.'-'; print_r(implode("==", $value_attribute_delimiter)); } } else { } } echo $res; $tvs1=explode("||",$attributes1); $tvs2=explode("==",$tvs1); echo '<pre>'; print_r($tvs1); echo '</pre>'; echo '<pre>'; print_r($tvs2); echo '</pre>'; echo '<pre>'; print_r($attributes_delimiter); echo '</pre>';
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught TypeError: implode(): Argument #2 ($array) must be of type ?array, string given in /in/oCUTA:19 Stack trace: #0 /in/oCUTA(19): implode('==', '\xD1\x87\xD0\xB5\xD1\x80\xD0\xBD\xD1\x8B\xD0\xB9') #1 {main} thrown in /in/oCUTA on line 19
Process exited with code 255.

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