3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $names = array( 'device' => 'Phones', 'tablet' => 'Tablets', 'smartwatch' => 'Smartwatch', 'speaker' => 'Speaker', 'headphones' => 'Headphones', 'wearable' => 'Wearable', ); var_dump(array_map(strtoupper, array_values($names)));
Output for 7.2.0
Warning: Use of undefined constant strtoupper - assumed 'strtoupper' (this will throw an Error in a future version of PHP) in /in/EutMi on line 12 array(6) { [0]=> string(6) "PHONES" [1]=> string(7) "TABLETS" [2]=> string(10) "SMARTWATCH" [3]=> string(7) "SPEAKER" [4]=> string(10) "HEADPHONES" [5]=> string(8) "WEARABLE" }
Output for 5.3.17 - 7.1.10
Notice: Use of undefined constant strtoupper - assumed 'strtoupper' in /in/EutMi on line 12 array(6) { [0]=> string(6) "PHONES" [1]=> string(7) "TABLETS" [2]=> string(10) "SMARTWATCH" [3]=> string(7) "SPEAKER" [4]=> string(10) "HEADPHONES" [5]=> string(8) "WEARABLE" }