3v4l.org

run code in 300+ PHP versions simultaneously
<?php function _arte_cms_tracking_og_are_settings_null($settings) { if(is_array($settings)) { if (!empty($settings)) { $current_value = array_shift($settings); if(!is_multiArrayEmpty($current_value) || !is_multiArrayEmpty($settings)){ return FALSE; } else { return TRUE; } } } // If we reached this point, the variable is not an array anymore. Trim it // and test if it is empty or not: $current_trimmed_value = trim($settings); if(empty($current_trimmed_value)){ return TRUE; } else { return FALSE; } } $t = array(); if (_arte_cms_tracking_og_are_settings_null($t)) { echo "EMPTY"; }else { echo "NOT EMPTY!"; }
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught TypeError: trim(): Argument #1 ($string) must be of type string, array given in /in/MpXIM:18 Stack trace: #0 /in/MpXIM(18): trim(Array) #1 /in/MpXIM(30): _arte_cms_tracking_og_are_settings_null(Array) #2 {main} thrown in /in/MpXIM on line 18
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:
73.53 ms | 401 KiB | 8 Q