3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function pgettext($context, $msgid) { $contextString = "{$context}\004{$msgid}"; $translation = gettext($contextString); if ($translation == $contextString) { return $msgid; } return $translation; } $firstWordExamples = array( pgettext('dng', 'Super'), pgettext('dng', 'Really'), pgettext('dng', 'Very'), pgettext('dng', 'Totally'), pgettext('dng', 'Extremely'), pgettext('dng', 'Rather'), pgettext('dng', 'Remarkably'), pgettext('dng', 'Frankly'), pgettext('dng', 'Dreadfully'), pgettext('dng', 'Awfully'), pgettext('dng', 'Quite'), pgettext('dng', 'Wicked'), pgettext('dng', 'Incredibly'), pgettext('dng', 'Monstrously'), pgettext('dng', 'Truly'), pgettext('dng', 'Completely'), pgettext('dng', 'Absolutely'), pgettext('dng', 'Cheerfully'), pgettext('dng', 'Excitedly'), pgettext('dng', 'Sweetly'), pgettext('dng', 'Gently'), pgettext('dng', 'Crazy'), pgettext('dng', 'Loudly'), pgettext('dng', 'Obviously'), pgettext('dng', 'Covertly'), pgettext('dng', 'Secretly'), pgettext('dng', 'Boldly'), pgettext('dng', 'Perfectly'), pgettext('dng', 'So'), pgettext('dng', 'Merrily'), pgettext('dng', 'Certainly'), pgettext('dng', 'Creatively'), pgettext('dng', 'Royally'), pgettext('dng', 'Passionately'), pgettext('dng', 'Simply'), pgettext('dng', 'Beautifully'), pgettext('dng', 'Happily'), pgettext('dng', 'Shamelessly'), pgettext('dng', 'Definitely'), pgettext('dng', 'Significantly'), pgettext('dng', 'Casually'), pgettext('dng', 'Positively'), pgettext('dng', 'Benevolently'), pgettext('dng', 'Surprisingly') ); $sexEnum = true; $secondWordExamples = array( $sexEnum === true ? pgettext('dng,male', 'Cool') : pgettext('dng,female', 'Cool'), $sexEnum === true ? pgettext('dng,male', 'Energetic') : pgettext('dng,female', 'Energetic'), $sexEnum === true ? pgettext('dng,male', 'Smart') : pgettext('dng,female', 'Smart'), $sexEnum === true ? pgettext('dng,male', 'Nice') : pgettext('dng,female', 'Nice'), $sexEnum === true ? pgettext('dng,male', 'Clever') : pgettext('dng,female', 'Clever'), $sexEnum === true ? pgettext('dng,male', 'Brave') : pgettext('dng,female', 'Brave'), $sexEnum === true ? pgettext('dng,male', 'Handsome') : pgettext('dng,female', 'Beautiful'), $sexEnum === true ? pgettext('dng,male', 'Sweet') : pgettext('dng,female', 'Sweet'), $sexEnum === true ? pgettext('dng,male', 'Magical') : pgettext('dng,female', 'Magical'), $sexEnum === true ? pgettext('dng,male', 'Chill') : pgettext('dng,female', 'Chill'), $sexEnum === true ? pgettext('dng,male', 'Fierce') : pgettext('dng,female', 'Fierce'), $sexEnum === true ? pgettext('dng,male', 'Real') : pgettext('dng,female', 'Real'), $sexEnum === true ? pgettext('dng,male', 'Tough') : pgettext('dng,female', 'Tough'), $sexEnum === true ? pgettext('dng,male', 'Wild') : pgettext('dng,female', 'Wild'), $sexEnum === true ? pgettext('dng,male', 'Nerdy') : pgettext('dng,female', 'Nerdy'), $sexEnum === true ? pgettext('dng,male', 'Funny') : pgettext('dng,female', 'Funny'), $sexEnum === true ? pgettext('dng,male', 'Sporty') : pgettext('dng,female', 'Sporty'), $sexEnum === true ? pgettext('dng,male', 'Flirty') : pgettext('dng,female', 'Flirty'), $sexEnum === true ? pgettext('dng,male', 'Happy') : pgettext('dng,female', 'Happy'), $sexEnum === true ? pgettext('dng,male', 'Artsy') : pgettext('dng,female', 'Artsy'), $sexEnum === true ? pgettext('dng,male', 'Crazy') : pgettext('dng,female', 'Crazy'), $sexEnum === true ? pgettext('dng,male', 'Sassy') : pgettext('dng,female', 'Sassy'), $sexEnum === true ? pgettext('dng,male', 'Classy') : pgettext('dng,female', 'Classy'), $sexEnum === true ? pgettext('dng,male', 'Cuddly') : pgettext('dng,female', 'Cuddly'), $sexEnum === true ? pgettext('dng,male', 'Fancy') : pgettext('dng,female', 'Fancy'), $sexEnum === true ? pgettext('dng,male', 'Friendly') : pgettext('dng,female', 'Friendly'), $sexEnum === true ? pgettext('dng,male', 'Fabulous') : pgettext('dng,female', 'Fabulous'), $sexEnum === true ? pgettext('dng,male', 'Kind') : pgettext('dng,female', 'Kind'), $sexEnum === true ? pgettext('dng,male', 'Loyal') : pgettext('dng,female', 'Loyal'), $sexEnum === true ? pgettext('dng,male', 'Genuine') : pgettext('dng,female', 'Genuine'), $sexEnum === true ? pgettext('dng,male', 'Adventurous'): pgettext('dng,female', 'Adventurous'), $sexEnum === true ? pgettext('dng,male', 'Silly') : pgettext('dng,female', 'Silly'), $sexEnum === true ? pgettext('dng,male', 'Caring') : pgettext('dng,female', 'Caring'), $sexEnum === true ? pgettext('dng,male', 'Smooth') : pgettext('dng,female', 'Smooth'), $sexEnum === true ? pgettext('dng,male', 'Outdoorsy') : pgettext('dng,female', 'Outdoorsy'), $sexEnum === true ? pgettext('dng,male', 'Huggable') : pgettext('dng,female', 'Huggable'), $sexEnum === true ? pgettext('dng,male', 'Active') : pgettext('dng,female', 'Active'), $sexEnum === true ? pgettext('dng,male', 'Romantic') : pgettext('dng,female', 'Romantic'), $sexEnum === true ? pgettext('dng,male', 'Witty') : pgettext('dng,female', 'Witty'), $sexEnum === true ? pgettext('dng,male', 'Easygoing') : pgettext('dng,female', 'Easygoing'), ); $randFirsts = array_rand($firstWordExamples, 3); print_r($randFirsts); $randSeconds = array_rand($secondWordExamples, 3); $nicenameExamples = array(); $nicenameExamples[] = sprintf(pgettext('dng', '%1$s%2$s'), $randFirsts[0], $randSeconds[0]); $nicenameExamples[] = sprintf(pgettext('dng', '%1$s%2$s'), $randFirsts[1], $randSeconds[1]); $nicenameExamples[] = sprintf(pgettext('dng', '%1$s%2$s'), $randFirsts[2], $randSeconds[2]); //print_r($nicenameExamples);
based on 7kjIb
Output for 7.1.0
Array ( [0] => 33 [1] => 34 [2] => 40 )
Output for 7.0.14
Array ( [0] => 24 [1] => 32 [2] => 37 )
Output for 7.0.10
Array ( [0] => 9 [1] => 14 [2] => 38 )
Output for 7.0.9
Array ( [0] => 11 [1] => 34 [2] => 42 )
Output for 7.0.8
Array ( [0] => 16 [1] => 35 [2] => 36 )
Output for 7.0.7
Array ( [0] => 1 [1] => 8 [2] => 13 )
Output for 7.0.6
Array ( [0] => 15 [1] => 20 [2] => 34 )
Output for 7.0.5
Array ( [0] => 4 [1] => 31 [2] => 33 )
Output for 7.0.4
Array ( [0] => 3 [1] => 25 [2] => 39 )
Output for 7.0.3
Array ( [0] => 7 [1] => 23 [2] => 42 )
Output for 7.0.2
Array ( [0] => 7 [1] => 15 [2] => 39 )
Output for 7.0.1
Array ( [0] => 7 [1] => 25 [2] => 35 )
Output for 7.0.0
Array ( [0] => 13 [1] => 21 [2] => 29 )
Output for 5.6.28
Array ( [0] => 21 [1] => 23 [2] => 39 )
Output for 5.6.25
Array ( [0] => 5 [1] => 20 [2] => 40 )
Output for 5.6.24
Array ( [0] => 14 [1] => 29 [2] => 34 )
Output for 5.6.23
Array ( [0] => 5 [1] => 19 [2] => 25 )
Output for 5.6.22
Array ( [0] => 10 [1] => 20 [2] => 30 )
Output for 5.6.21
Array ( [0] => 31 [1] => 35 [2] => 43 )
Output for 5.6.20
Array ( [0] => 21 [1] => 36 [2] => 38 )
Output for 5.6.19
Array ( [0] => 6 [1] => 7 [2] => 11 )
Output for 5.6.18
Array ( [0] => 8 [1] => 10 [2] => 16 )
Output for 5.6.17
Array ( [0] => 5 [1] => 18 [2] => 41 )
Output for 5.6.16
Array ( [0] => 4 [1] => 6 [2] => 27 )
Output for 5.6.15
Array ( [0] => 2 [1] => 4 [2] => 11 )
Output for 5.6.14
Array ( [0] => 11 [1] => 35 [2] => 37 )
Output for 5.6.13
Array ( [0] => 6 [1] => 23 [2] => 33 )
Output for 5.6.12
Array ( [0] => 4 [1] => 14 [2] => 32 )
Output for 5.6.11
Array ( [0] => 16 [1] => 20 [2] => 30 )
Output for 5.6.10
Array ( [0] => 20 [1] => 30 [2] => 36 )
Output for 5.6.9
Array ( [0] => 3 [1] => 9 [2] => 26 )
Output for 5.6.8
Array ( [0] => 5 [1] => 11 [2] => 31 )
Output for 5.6.7
Array ( [0] => 13 [1] => 16 [2] => 37 )
Output for 5.6.6
Array ( [0] => 13 [1] => 28 [2] => 34 )
Output for 5.6.5
Array ( [0] => 7 [1] => 18 [2] => 23 )
Output for 5.6.4
Array ( [0] => 4 [1] => 9 [2] => 30 )
Output for 5.6.3
Array ( [0] => 12 [1] => 19 [2] => 37 )
Output for 5.6.2
Array ( [0] => 10 [1] => 12 [2] => 32 )
Output for 5.6.1
Array ( [0] => 14 [1] => 15 [2] => 31 )
Output for 5.6.0
Array ( [0] => 23 [1] => 28 [2] => 37 )
Output for 5.5.38
Array ( [0] => 15 [1] => 20 [2] => 25 )
Output for 5.5.37
Array ( [0] => 11 [1] => 34 [2] => 36 )
Output for 5.5.36
Array ( [0] => 2 [1] => 14 [2] => 27 )
Output for 5.5.35
Array ( [0] => 31 [1] => 37 [2] => 42 )
Output for 5.5.34
Array ( [0] => 12 [1] => 14 [2] => 23 )
Output for 5.5.33
Array ( [0] => 0 [1] => 28 [2] => 36 )
Output for 5.5.32
Array ( [0] => 8 [1] => 15 [2] => 36 )
Output for 5.5.31
Array ( [0] => 10 [1] => 17 [2] => 40 )
Output for 5.5.30
Array ( [0] => 10 [1] => 32 [2] => 35 )
Output for 5.5.29
Array ( [0] => 8 [1] => 12 [2] => 27 )
Output for 5.5.28
Array ( [0] => 0 [1] => 25 [2] => 28 )
Output for 5.5.27
Array ( [0] => 0 [1] => 6 [2] => 37 )
Output for 5.5.26
Array ( [0] => 19 [1] => 22 [2] => 39 )
Output for 5.5.25
Array ( [0] => 3 [1] => 4 [2] => 40 )
Output for 5.5.24
Array ( [0] => 10 [1] => 20 [2] => 24 )
Output for 5.5.23
Array ( [0] => 9 [1] => 28 [2] => 35 )
Output for 5.5.22
Array ( [0] => 8 [1] => 32 [2] => 40 )
Output for 5.5.21
Array ( [0] => 6 [1] => 9 [2] => 42 )
Output for 5.5.20
Array ( [0] => 16 [1] => 18 [2] => 38 )
Output for 5.5.19
Array ( [0] => 20 [1] => 23 [2] => 35 )
Output for 5.5.18
Array ( [0] => 5 [1] => 13 [2] => 39 )
Output for 5.5.16
Array ( [0] => 6 [1] => 33 [2] => 39 )
Output for 5.5.15
Array ( [0] => 1 [1] => 15 [2] => 17 )
Output for 5.5.14
Array ( [0] => 3 [1] => 13 [2] => 23 )
Output for 5.5.13
Array ( [0] => 28 [1] => 29 [2] => 39 )
Output for 5.5.12
Array ( [0] => 10 [1] => 23 [2] => 30 )
Output for 5.5.11
Array ( [0] => 3 [1] => 14 [2] => 28 )
Output for 5.5.10
Array ( [0] => 15 [1] => 18 [2] => 42 )
Output for 5.5.9
Array ( [0] => 0 [1] => 28 [2] => 34 )
Output for 5.5.8
Array ( [0] => 2 [1] => 11 [2] => 13 )
Output for 5.5.7
Array ( [0] => 13 [1] => 15 [2] => 43 )
Output for 5.5.6
Array ( [0] => 5 [1] => 38 [2] => 40 )
Output for 5.5.5
Array ( [0] => 16 [1] => 33 [2] => 38 )
Output for 5.5.4
Array ( [0] => 27 [1] => 29 [2] => 35 )
Output for 5.5.3
Array ( [0] => 5 [1] => 28 [2] => 37 )
Output for 5.5.2
Array ( [0] => 9 [1] => 18 [2] => 41 )
Output for 5.5.1
Array ( [0] => 29 [1] => 33 [2] => 39 )
Output for 5.5.0
Array ( [0] => 12 [1] => 22 [2] => 38 )
Output for 5.4.45
Array ( [0] => 3 [1] => 25 [2] => 36 )
Output for 5.4.44
Array ( [0] => 10 [1] => 32 [2] => 37 )
Output for 5.4.43
Array ( [0] => 15 [1] => 17 [2] => 43 )
Output for 5.4.42
Array ( [0] => 0 [1] => 40 [2] => 41 )
Output for 5.4.41
Array ( [0] => 17 [1] => 21 [2] => 27 )
Output for 5.4.40
Array ( [0] => 12 [1] => 22 [2] => 26 )
Output for 5.4.39
Array ( [0] => 3 [1] => 24 [2] => 32 )
Output for 5.4.38
Array ( [0] => 1 [1] => 9 [2] => 17 )
Output for 5.4.37
Array ( [0] => 6 [1] => 24 [2] => 42 )
Output for 5.4.36
Array ( [0] => 23 [1] => 29 [2] => 38 )
Output for 5.4.35
Array ( [0] => 1 [1] => 21 [2] => 22 )
Output for 5.4.34
Array ( [0] => 4 [1] => 25 [2] => 26 )
Output for 5.4.32
Array ( [0] => 1 [1] => 5 [2] => 26 )
Output for 5.4.31
Array ( [0] => 8 [1] => 17 [2] => 27 )
Output for 5.4.30
Array ( [0] => 4 [1] => 9 [2] => 28 )
Output for 5.4.29
Array ( [0] => 0 [1] => 10 [2] => 32 )
Output for 5.4.28
Array ( [0] => 29 [1] => 34 [2] => 35 )
Output for 5.4.27
Array ( [0] => 5 [1] => 31 [2] => 41 )
Output for 5.4.26
Array ( [0] => 17 [1] => 25 [2] => 41 )
Output for 5.4.25
Array ( [0] => 19 [1] => 35 [2] => 36 )
Output for 5.4.24
Array ( [0] => 1 [1] => 19 [2] => 21 )
Output for 5.4.23
Array ( [0] => 4 [1] => 25 [2] => 40 )
Output for 5.4.22
Array ( [0] => 11 [1] => 39 [2] => 40 )
Output for 5.4.21
Array ( [0] => 15 [1] => 35 [2] => 40 )
Output for 5.4.20
Array ( [0] => 9 [1] => 22 [2] => 41 )
Output for 5.4.19
Array ( [0] => 9 [1] => 32 [2] => 38 )
Output for 5.4.18
Array ( [0] => 2 [1] => 5 [2] => 9 )
Output for 5.4.17
Array ( [0] => 5 [1] => 12 [2] => 40 )
Output for 5.4.16
Array ( [0] => 8 [1] => 15 [2] => 27 )
Output for 5.4.15
Array ( [0] => 1 [1] => 3 [2] => 4 )
Output for 5.4.14
Array ( [0] => 5 [1] => 6 [2] => 42 )
Output for 5.4.13
Array ( [0] => 18 [1] => 22 [2] => 32 )
Output for 5.4.12
Array ( [0] => 15 [1] => 16 [2] => 25 )
Output for 5.4.11
Array ( [0] => 14 [1] => 17 [2] => 20 )
Output for 5.4.10
Array ( [0] => 16 [1] => 20 [2] => 33 )
Output for 5.4.9
Array ( [0] => 14 [1] => 26 [2] => 29 )
Output for 5.4.8
Array ( [0] => 1 [1] => 7 [2] => 17 )
Output for 5.4.7
Array ( [0] => 10 [1] => 14 [2] => 28 )
Output for 5.4.6
Array ( [0] => 5 [1] => 24 [2] => 39 )
Output for 5.4.5
Array ( [0] => 4 [1] => 23 [2] => 25 )
Output for 5.4.4
Array ( [0] => 20 [1] => 23 [2] => 25 )
Output for 5.4.3
Array ( [0] => 3 [1] => 25 [2] => 34 )
Output for 5.4.2
Array ( [0] => 8 [1] => 29 [2] => 41 )
Output for 5.4.1
Array ( [0] => 23 [1] => 29 [2] => 41 )
Output for 5.4.0
Array ( [0] => 2 [1] => 19 [2] => 22 )