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); $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 2vNVr
Output for 7.1.0
Array ( [0] => 1610 [1] => 2117 [2] => 2534 )
Output for 7.0.14
Array ( [0] => 35 [1] => 1411 [2] => 4221 )
Output for 7.0.11
Array ( [0] => 121 [1] => 155 [2] => 1919 )
Output for 7.0.10
Array ( [0] => 42 [1] => 2412 [2] => 3234 )
Output for 7.0.9
Array ( [0] => 1719 [1] => 2524 [2] => 4028 )
Output for 7.0.8
Array ( [0] => 95 [1] => 1614 [2] => 3826 )
Output for 7.0.7
Array ( [0] => 327 [1] => 369 [2] => 3938 )
Output for 7.0.6
Array ( [0] => 292 [1] => 3019 [2] => 3822 )
Output for 7.0.5
Array ( [0] => 45 [1] => 829 [2] => 1131 )
Output for 7.0.4
Array ( [0] => 16 [1] => 514 [2] => 2624 )
Output for 7.0.3
Array ( [0] => 314 [1] => 1518 [2] => 1724 )
Output for 7.0.2
Array ( [0] => 2011 [1] => 3016 [2] => 3229 )
Output for 7.0.1
Array ( [0] => 010 [1] => 1717 [2] => 4236 )
Output for 7.0.0
Array ( [0] => 214 [1] => 735 [2] => 4238 )
Output for hhvm-3.13.2
Array ( [0] => 2135 [1] => 3311 [2] => 1515 )
Output for hhvm-3.12.0
Array ( [0] => 3631 [1] => 2835 [2] => 371 )
Output for hhvm-3.10.0
Fatal error: Call to undefined function gettext() in /in/7kjIb on line 6
Process exited with code 255.
Output for 5.6.28
Array ( [0] => 03 [1] => 1012 [2] => 3520 )
Output for 5.6.26
Array ( [0] => 09 [1] => 325 [2] => 3539 )
Output for 5.6.25
Array ( [0] => 910 [1] => 1615 [2] => 3716 )
Output for 5.6.24
Array ( [0] => 115 [1] => 2917 [2] => 3021 )
Output for 5.6.23
Array ( [0] => 48 [1] => 2114 [2] => 3317 )
Output for 5.6.22
Array ( [0] => 20 [1] => 155 [2] => 2318 )
Output for 5.6.21
Array ( [0] => 116 [1] => 1921 [2] => 2834 )
Output for 5.6.20
Array ( [0] => 144 [1] => 3213 [2] => 3828 )
Output for 5.6.19
Array ( [0] => 1412 [1] => 2729 [2] => 2936 )
Output for 5.6.18
Array ( [0] => 61 [1] => 138 [2] => 4322 )
Output for 5.6.17
Array ( [0] => 1326 [1] => 2536 [2] => 3137 )
Output for 5.6.16
Array ( [0] => 208 [1] => 289 [2] => 3013 )
Output for 5.6.15
Array ( [0] => 318 [1] => 2724 [2] => 3526 )
Output for 5.6.14
Array ( [0] => 013 [1] => 516 [2] => 1225 )
Output for 5.6.13
Array ( [0] => 314 [1] => 3017 [2] => 4328 )
Output for 5.6.12
Array ( [0] => 228 [1] => 2417 [2] => 2918 )
Output for 5.6.11
Array ( [0] => 54 [1] => 2010 [2] => 3518 )
Output for 5.6.10
Array ( [0] => 155 [1] => 2623 [2] => 3832 )
Output for 5.6.9
Array ( [0] => 1011 [1] => 3219 [2] => 3426 )
Output for 5.6.8
Array ( [0] => 35 [1] => 1617 [2] => 4239 )
Output for 5.6.7
Array ( [0] => 31 [1] => 1514 [2] => 2631 )
Output for 5.6.6
Array ( [0] => 109 [1] => 1211 [2] => 2839 )
Output for 5.6.5
Array ( [0] => 826 [1] => 1335 [2] => 3339 )
Output for 5.6.4
Array ( [0] => 2118 [1] => 2227 [2] => 4130 )
Output for 5.6.3
Array ( [0] => 511 [1] => 924 [2] => 2926 )
Output for 5.6.2
Array ( [0] => 114 [1] => 2330 [2] => 4234 )
Output for 5.6.1
Array ( [0] => 219 [1] => 2519 [2] => 3031 )
Output for 5.6.0
Array ( [0] => 12 [1] => 511 [2] => 3424 )
Output for 5.5.38
Array ( [0] => 1323 [1] => 1436 [2] => 1537 )
Output for 5.5.37
Array ( [0] => 24 [1] => 1616 [2] => 2638 )
Output for 5.5.36
Array ( [0] => 1015 [1] => 1121 [2] => 3422 )
Output for 5.5.35
Array ( [0] => 47 [1] => 2726 [2] => 3727 )
Output for 5.5.34
Array ( [0] => 632 [1] => 834 [2] => 1738 )
Output for 5.5.33
Array ( [0] => 613 [1] => 1016 [2] => 2829 )
Output for 5.5.32
Array ( [0] => 031 [1] => 333 [2] => 439 )
Output for 5.5.31
Array ( [0] => 54 [1] => 1724 [2] => 2439 )
Output for 5.5.30
Array ( [0] => 910 [1] => 2017 [2] => 3733 )
Output for 5.5.29
Array ( [0] => 82 [1] => 198 [2] => 2519 )
Output for 5.5.28
Array ( [0] => 123 [1] => 245 [2] => 2627 )
Output for 5.5.27
Array ( [0] => 06 [1] => 816 [2] => 1718 )
Output for 5.5.26
Array ( [0] => 920 [1] => 1232 [2] => 1334 )
Output for 5.5.25
Array ( [0] => 1011 [1] => 1534 [2] => 3339 )
Output for 5.5.24
Array ( [0] => 129 [1] => 1816 [2] => 3928 )
Output for 5.5.23
Array ( [0] => 103 [1] => 3111 [2] => 3228 )
Output for 5.5.22
Array ( [0] => 014 [1] => 1128 [2] => 1536 )
Output for 5.5.21
Array ( [0] => 06 [1] => 1318 [2] => 4121 )
Output for 5.5.20
Array ( [0] => 176 [1] => 2522 [2] => 3836 )
Output for 5.5.19
Array ( [0] => 03 [1] => 187 [2] => 3223 )
Output for 5.5.18
Array ( [0] => 011 [1] => 1819 [2] => 3321 )
Output for 5.5.16
Array ( [0] => 423 [1] => 733 [2] => 2036 )
Output for 5.5.15
Array ( [0] => 224 [1] => 3711 [2] => 3917 )
Output for 5.5.14
Array ( [0] => 818 [1] => 1121 [2] => 1734 )
Output for 5.5.13
Array ( [0] => 08 [1] => 2431 [2] => 3539 )
Output for 5.5.12
Array ( [0] => 1212 [1] => 1532 [2] => 2335 )
Output for 5.5.11
Array ( [0] => 716 [1] => 2229 [2] => 4339 )
Output for 5.5.10
Array ( [0] => 228 [1] => 2614 [2] => 3932 )
Output for 5.5.9
Array ( [0] => 117 [1] => 2818 [2] => 4138 )
Output for 5.5.8
Array ( [0] => 123 [1] => 2211 [2] => 3412 )
Output for 5.5.7
Array ( [0] => 162 [1] => 279 [2] => 3218 )
Output for 5.5.6
Array ( [0] => 210 [1] => 1622 [2] => 3531 )
Output for 5.5.5
Array ( [0] => 07 [1] => 1314 [2] => 3019 )
Output for 5.5.4
Array ( [0] => 131 [1] => 187 [2] => 299 )
Output for 5.5.3
Array ( [0] => 621 [1] => 1323 [2] => 1834 )
Output for 5.5.2
Array ( [0] => 240 [1] => 2517 [2] => 3528 )
Output for 5.5.1
Array ( [0] => 2016 [1] => 2523 [2] => 3031 )
Output for 5.5.0
Array ( [0] => 510 [1] => 3614 [2] => 4130 )
Output for 5.4.45
Array ( [0] => 2213 [1] => 2321 [2] => 3336 )
Output for 5.4.44
Array ( [0] => 513 [1] => 1224 [2] => 3827 )
Output for 5.4.43
Array ( [0] => 1730 [1] => 3636 [2] => 3837 )
Output for 5.4.42
Array ( [0] => 160 [1] => 192 [2] => 4135 )
Output for 5.4.41
Array ( [0] => 215 [1] => 256 [2] => 3712 )
Output for 5.4.40
Array ( [0] => 91 [1] => 123 [2] => 1813 )
Output for 5.4.39
Array ( [0] => 11 [1] => 2917 [2] => 3219 )
Output for 5.4.38
Array ( [0] => 139 [1] => 2116 [2] => 2329 )
Output for 5.4.37
Array ( [0] => 730 [1] => 3232 [2] => 4133 )
Output for 5.4.36
Array ( [0] => 00 [1] => 151 [2] => 3825 )
Output for 5.4.35
Array ( [0] => 1312 [1] => 1515 [2] => 4332 )
Output for 5.4.34
Array ( [0] => 213 [1] => 735 [2] => 2537 )
Output for 5.4.32
Array ( [0] => 1012 [1] => 2614 [2] => 2738 )
Output for 5.4.31
Array ( [0] => 109 [1] => 2714 [2] => 3634 )
Output for 5.4.30
Array ( [0] => 210 [1] => 3619 [2] => 4133 )
Output for 5.4.29
Array ( [0] => 2319 [1] => 4026 [2] => 4139 )
Output for 5.4.28
Array ( [0] => 137 [1] => 3417 [2] => 4026 )
Output for 5.4.27
Array ( [0] => 123 [1] => 227 [2] => 3436 )
Output for 5.4.26
Array ( [0] => 03 [1] => 114 [2] => 1816 )
Output for 5.4.25
Array ( [0] => 1415 [1] => 2728 [2] => 2839 )
Output for 5.4.24
Array ( [0] => 49 [1] => 810 [2] => 2518 )
Output for 5.4.23
Array ( [0] => 106 [1] => 2927 [2] => 3437 )
Output for 5.4.22
Array ( [0] => 87 [1] => 2417 [2] => 3332 )
Output for 5.4.21
Array ( [0] => 710 [1] => 1114 [2] => 1918 )
Output for 5.4.20
Array ( [0] => 46 [1] => 259 [2] => 3423 )
Output for 5.4.19
Array ( [0] => 243 [1] => 3216 [2] => 3423 )
Output for 5.4.18
Array ( [0] => 318 [1] => 2425 [2] => 3534 )
Output for 5.4.17
Array ( [0] => 27 [1] => 209 [2] => 3027 )
Output for 5.4.16
Array ( [0] => 1034 [1] => 1535 [2] => 2338 )
Output for 5.4.15
Array ( [0] => 1710 [1] => 3822 [2] => 4330 )
Output for 5.4.14
Array ( [0] => 34 [1] => 635 [2] => 3638 )
Output for 5.4.13
Array ( [0] => 510 [1] => 3314 [2] => 3539 )
Output for 5.4.12
Array ( [0] => 612 [1] => 1925 [2] => 3334 )
Output for 5.4.11
Array ( [0] => 324 [1] => 3331 [2] => 4233 )
Output for 5.4.10
Array ( [0] => 3110 [1] => 3219 [2] => 3331 )
Output for 5.4.9
Array ( [0] => 1212 [1] => 1422 [2] => 4233 )
Output for 5.4.8
Array ( [0] => 250 [1] => 2733 [2] => 3436 )
Output for 5.4.7
Array ( [0] => 02 [1] => 1934 [2] => 2336 )
Output for 5.4.6
Array ( [0] => 312 [1] => 3920 [2] => 4126 )
Output for 5.4.5
Array ( [0] => 26 [1] => 2010 [2] => 2817 )
Output for 5.4.4
Array ( [0] => 230 [1] => 3430 [2] => 4336 )
Output for 5.4.3
Array ( [0] => 32 [1] => 3111 [2] => 3636 )
Output for 5.4.2
Array ( [0] => 314 [1] => 422 [2] => 837 )
Output for 5.4.1
Array ( [0] => 33 [1] => 1318 [2] => 1635 )
Output for 5.4.0
Array ( [0] => 130 [1] => 2813 [2] => 3338 )