3v4l.org

run code in 300+ PHP versions simultaneously
<?php $tmp = [ 'uuid' => '', 'format' => '', 'adress' => '', 'lastname' => '', 'firstname' => '', ]; $users[] = array( 'ckey' => strlen(trim($tmp['uuid'])) ? $tmp['uuid'] : 'test', 'language' => $tmp['language'] ? trim($tmp['language']) : 'de', 'newsletter_format' => $tmp['format'] ? trim(strtolower($tmp['format'])) : 'html', 'adress' => $tmp['adress'] ? trim($tmp['adress']) : '', 'last_name' => $tmp['lastname'] ? trim($tmp['lastname']) : '', 'first_name' => $tmp['firstname'] ? trim($tmp['firstname']) : '', 'email' => trim($tmp['email']), 'mobile' => '0', ); var_dump($users);
Output for git.master, git.master_jit, rfc.property-hooks
Warning: Undefined array key "language" in /in/YEE2i on line 14 Warning: Undefined array key "email" in /in/YEE2i on line 19 Deprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated in /in/YEE2i on line 19 array(1) { [0]=> array(8) { ["ckey"]=> string(4) "test" ["language"]=> string(2) "de" ["newsletter_format"]=> string(4) "html" ["adress"]=> string(0) "" ["last_name"]=> string(0) "" ["first_name"]=> string(0) "" ["email"]=> string(0) "" ["mobile"]=> string(1) "0" } }

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