3v4l.org

run code in 300+ PHP versions simultaneously
<?php $n_data= [ "checklist1" => "major", "result_audit1" => "1", "checklist2" => "minor", "result_audit2" => "2", "checklist3" => "pico", "result_audit3" => "3", "checklist4" => "goodpoints", "result_audit4" => "4", "submit" => "Submit Now", ]; $chunked['checklist'] = array_chunk(array_splice($n_data, 0, count($n_data) - 1), 2); array_walk($chunked['checklist'], fn(&$v, $idx) => $v = ['selected' => $v[0], 'result_audit' => $v[1], 'origin' => 'checklist'. ($idx + 1)]); print_r($chunked);
Output for 8.0.1 - 8.0.30, 8.1.0 - 8.1.34, 8.2.0 - 8.2.30, 8.3.0 - 8.3.29, 8.4.1 - 8.4.14, 8.4.16 - 8.4.17, 8.5.0 - 8.5.2
Array ( [checklist] => Array ( [0] => Array ( [selected] => major [result_audit] => 1 [origin] => checklist1 ) [1] => Array ( [selected] => minor [result_audit] => 2 [origin] => checklist2 ) [2] => Array ( [selected] => pico [result_audit] => 3 [origin] => checklist3 ) [3] => Array ( [selected] => goodpoints [result_audit] => 4 [origin] => checklist4 ) ) )
Output for 8.4.15
/bin/php-8.4.15: /usr/lib/libm.so.6: version `GLIBC_2.38' not found (required by /bin/php-8.4.15) /bin/php-8.4.15: /usr/lib/libm.so.6: version `GLIBC_2.35' not found (required by /bin/php-8.4.15) /bin/php-8.4.15: /usr/lib/libc.so.6: version `GLIBC_2.34' not found (required by /bin/php-8.4.15) /bin/php-8.4.15: /usr/lib/libc.so.6: version `GLIBC_2.38' not found (required by /bin/php-8.4.15)
Process exited with code 1.

preferences:
125.1 ms | 408 KiB | 5 Q