3v4l.org

run code in 300+ PHP versions simultaneously
<?php $my_array = array(); $my_array['id'] = 4127 ; $my_array['nick'] = 'Jonas'; $my_array['dte79855545'] = 5; $my_array['dte79855545'] = 5; $my_array['dte1111'] = 1; $my_array['dte2222'] = 2; $my_array['dte3333'] = 3; $my_array['dte4444'] = 4; $my_array_of_dte = array(); $dte_inc = 0; foreach($my_array as $key => $value) { if (substr($key,0,3)=='dte') { $my_array_of_dte[$dte_inc]['id'] = substr($key,3); $my_array_of_dte[$dte_inc]['value'] = $value; $dte_inc++; } } for($inc=0;$inc<$dte_inc;$inc++) { $query = "INSERT INTO user_count (id, nick, dte, count) VALUES ('".$my_array['id']."', '".$my_array['nick'] = 'Jonas'."', '".$my_array_of_dte[$inc]['id']."', '".$my_array_of_dte[$inc]['value']."')"; // $result = mysql_query($query); echo $query."\n"; } ?>
Output for git.master, git.master_jit, rfc.property-hooks
INSERT INTO user_count (id, nick, dte, count) VALUES ('4127', 'Jonas', '79855545', '5') INSERT INTO user_count (id, nick, dte, count) VALUES ('4127', 'Jonas', '1111', '1') INSERT INTO user_count (id, nick, dte, count) VALUES ('4127', 'Jonas', '2222', '2') INSERT INTO user_count (id, nick, dte, count) VALUES ('4127', 'Jonas', '3333', '3') INSERT INTO user_count (id, nick, dte, count) VALUES ('4127', 'Jonas', '4444', '4')

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:
44.1 ms | 402 KiB | 8 Q