3v4l.org

run code in 300+ PHP versions simultaneously
<?php $row = '{ "persona_apellido": "hey", "persona_apellido-maxwidth": 48, "persona_curso": "info", "persona_curso-maxwidth": 32, "persona_email": "dude@dude.com", "persona_email-maxwidth": 128, "persona_freg": "2013-08-15 17:03:58", "persona_freg-maxwidth": 152, "persona_id": "3", "persona_id-maxwidth": 8, "persona_nombre": "dude", "persona_nombre-maxwidth": 64, "up_persona_apellido": "", "up_persona_curso": "", "up_persona_email": "", "up_persona_freg": "", "up_persona_id": "", "up_persona_nombre": ""}'; $row = json_decode($row, true); $queryIn = '';$ladoA = 0;$ladoB = 0; foreach($row as $k => $value){ if(strstr($k,'-maxwidth') === false && strstr($k,'itemSelected') === false){ if(!empty($value) && strstr($k,'up_') !== false){ $queryIn =+ ' '.substr($k, 3, strlen($k)).'='.$value; $ladoA++; }else{ $queryIn =+ ' '.$k.'='.$value; $ladoB++; } } } var_dump($row); echo $queryIn;
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught TypeError: Unsupported operand types: string * int in /in/O3ETM:29 Stack trace: #0 {main} thrown in /in/O3ETM on line 29
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:
46.1 ms | 401 KiB | 8 Q