3v4l.org

run code in 300+ PHP versions simultaneously
<?php $copy = $columns = [ // in groups of 8 for simpler counting/reading 'naam', 'geslacht', 'fokrichting', 'kleur', 'kleur_uk', 'geb_dat2', 'fokker', 'fok_plaats', 'prijs', 'film_url', 'volgnr', 'jaar', 'extra', 'extra_uk', 'topstar', 'horsetelex_pedigree_id', 'sb_m_horsetelex_pedigree_id', 'kwpn_pedigree_id', 'sb_v', 'sb_vv', 'sb_vvv', 'sb_m', 'sb_vm', 'sb_vvm', 'sb_mm', 'sb_vmm', 'sb_vmv', 'sb_mmm', 'sb_mv', 'sb_mvv', 'sb_mmv', 'sb_mvm', 'sb_vvvv', 'sb_mvvv', 'sb_vmvv', 'sb_mmvv', 'sb_vvmv', 'sb_mvmv', 'sb_vmmv', 'sb_mmmv', 'sb_vvvm', 'sb_mvvm', 'sb_vmvm', 'sb_mmvm', 'sb_vvmm', 'sb_mvmm', 'sb_vmmm', 'sb_mmmm' ]; $column_count = sizeof($column); sort($copy); $_POST = array_combine($copy, range(1, $column_count)); array_splice($_POST, 0, 4); // remove the first four elements as demonstration var_export($_POST); echo "\n"; $defaults = array_fill_keys($columns, null); $POST_filtered = array_intersect_key($_POST, $defaults); var_export($POST_filtered); echo "\n"; $clean_data = array_replace($defaults, $POST_filtered); var_export($clean_data); echo "\n";
Output for git.master, git.master_jit, rfc.property-hooks
Warning: Undefined variable $column in /in/KrUhV on line 10 Fatal error: Uncaught TypeError: sizeof(): Argument #1 ($value) must be of type Countable|array, null given in /in/KrUhV:10 Stack trace: #0 {main} thrown in /in/KrUhV on line 10
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:
55.97 ms | 401 KiB | 8 Q