3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array(Array('b','d'), Array('c','a'), Array('b','d'), Array('a','d'), Array('c'), Array('c'), Array('a','d','e'), Array('d','b') ); function array_count_values_of($value, $array) { $counts = array_count_values($array); return $counts[$value]; } for($i=0 ; $i<count($array) ; $i++) { $temp = array_count_values_of($array[$i], $array); $result[$i][0] = $array[$i]; $result[$i][1] = $temp; } print_r($result);
Output for git.master, git.master_jit
Warning: array_count_values(): Can only count string and integer values, entry skipped in /in/J1N8Z on line 13 Warning: array_count_values(): Can only count string and integer values, entry skipped in /in/J1N8Z on line 13 Warning: array_count_values(): Can only count string and integer values, entry skipped in /in/J1N8Z on line 13 Warning: array_count_values(): Can only count string and integer values, entry skipped in /in/J1N8Z on line 13 Warning: array_count_values(): Can only count string and integer values, entry skipped in /in/J1N8Z on line 13 Warning: array_count_values(): Can only count string and integer values, entry skipped in /in/J1N8Z on line 13 Warning: array_count_values(): Can only count string and integer values, entry skipped in /in/J1N8Z on line 13 Warning: array_count_values(): Can only count string and integer values, entry skipped in /in/J1N8Z on line 13 Fatal error: Uncaught TypeError: Illegal offset type in /in/J1N8Z:14 Stack trace: #0 /in/J1N8Z(18): array_count_values_of(Array, Array) #1 {main} thrown in /in/J1N8Z on line 14
Process exited with code 255.
Output for rfc.property-hooks
Warning: array_count_values(): Can only count string and integer values, entry skipped in /in/J1N8Z on line 13 Warning: array_count_values(): Can only count string and integer values, entry skipped in /in/J1N8Z on line 13 Warning: array_count_values(): Can only count string and integer values, entry skipped in /in/J1N8Z on line 13 Warning: array_count_values(): Can only count string and integer values, entry skipped in /in/J1N8Z on line 13 Warning: array_count_values(): Can only count string and integer values, entry skipped in /in/J1N8Z on line 13 Warning: array_count_values(): Can only count string and integer values, entry skipped in /in/J1N8Z on line 13 Warning: array_count_values(): Can only count string and integer values, entry skipped in /in/J1N8Z on line 13 Warning: array_count_values(): Can only count string and integer values, entry skipped in /in/J1N8Z on line 13 Fatal error: Uncaught TypeError: Cannot access offset of type array on array in /in/J1N8Z:14 Stack trace: #0 /in/J1N8Z(18): array_count_values_of(Array, Array) #1 {main} thrown in /in/J1N8Z on line 14
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:
39.12 ms | 402 KiB | 8 Q