3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function encode_char($c) { $sum = ord($c); $first = rand(-100,100); $second = rand(-100,100); $third = $sum - ($first + $second); return [$first, $second, $third]; } print_r(encode_char('a')); ?>
Output for 7.1.0
Array ( [0] => -90 [1] => -18 [2] => 205 )
Output for 7.0.14
Array ( [0] => -39 [1] => -67 [2] => 203 )
Output for 7.0.10
Array ( [0] => 82 [1] => 99 [2] => -84 )
Output for 7.0.9
Array ( [0] => 33 [1] => -93 [2] => 157 )
Output for 7.0.8
Array ( [0] => 89 [1] => 89 [2] => -81 )
Output for 7.0.7
Array ( [0] => 66 [1] => -84 [2] => 115 )
Output for 7.0.6
Array ( [0] => 45 [1] => 31 [2] => 21 )
Output for 7.0.5
Array ( [0] => -6 [1] => -71 [2] => 174 )
Output for 7.0.4
Array ( [0] => 52 [1] => -82 [2] => 127 )
Output for 7.0.3
Array ( [0] => -47 [1] => 21 [2] => 123 )
Output for 7.0.2
Array ( [0] => -9 [1] => 29 [2] => 77 )
Output for 7.0.1
Array ( [0] => 35 [1] => 12 [2] => 50 )
Output for 7.0.0
Array ( [0] => -39 [1] => -76 [2] => 212 )
Output for 5.6.28
Array ( [0] => -98 [1] => 30 [2] => 165 )
Output for 5.6.25
Array ( [0] => -25 [1] => 77 [2] => 45 )
Output for 5.6.24
Array ( [0] => 89 [1] => 24 [2] => -16 )
Output for 5.6.23
Array ( [0] => -3 [1] => -93 [2] => 193 )
Output for 5.6.22
Array ( [0] => 97 [1] => 18 [2] => -18 )
Output for 5.6.21
Array ( [0] => -99 [1] => 91 [2] => 105 )
Output for 5.6.20
Array ( [0] => -22 [1] => -50 [2] => 169 )
Output for 5.6.19
Array ( [0] => 34 [1] => -27 [2] => 90 )
Output for 5.6.18
Array ( [0] => -96 [1] => -86 [2] => 279 )
Output for 5.6.17
Array ( [0] => 55 [1] => 55 [2] => -13 )
Output for 5.6.16
Array ( [0] => 94 [1] => 68 [2] => -65 )
Output for 5.6.15
Array ( [0] => -40 [1] => 97 [2] => 40 )
Output for 5.6.14
Array ( [0] => -78 [1] => -39 [2] => 214 )
Output for 5.6.13
Array ( [0] => 81 [1] => -15 [2] => 31 )
Output for 5.6.12
Array ( [0] => 3 [1] => 33 [2] => 61 )
Output for 5.6.11
Array ( [0] => -8 [1] => 82 [2] => 23 )
Output for 5.6.10
Array ( [0] => 63 [1] => 21 [2] => 13 )
Output for 5.6.9
Array ( [0] => 64 [1] => 43 [2] => -10 )
Output for 5.6.8
Array ( [0] => 49 [1] => -41 [2] => 89 )
Output for 5.6.7
Array ( [0] => 66 [1] => 23 [2] => 8 )
Output for 5.6.6
Array ( [0] => -51 [1] => -51 [2] => 199 )
Output for 5.6.5
Array ( [0] => 51 [1] => -51 [2] => 97 )
Output for 5.6.4
Array ( [0] => -12 [1] => 6 [2] => 103 )
Output for 5.6.3
Array ( [0] => 66 [1] => -32 [2] => 63 )
Output for 5.6.2
Array ( [0] => 83 [1] => 60 [2] => -46 )
Output for 5.6.1
Array ( [0] => -4 [1] => -30 [2] => 131 )
Output for 5.6.0
Array ( [0] => -56 [1] => -34 [2] => 187 )
Output for 5.5.38
Array ( [0] => 42 [1] => 25 [2] => 30 )
Output for 5.5.37
Array ( [0] => -63 [1] => 87 [2] => 73 )
Output for 5.5.36
Array ( [0] => -22 [1] => -23 [2] => 142 )
Output for 5.5.35
Array ( [0] => -3 [1] => 29 [2] => 71 )
Output for 5.5.34
Array ( [0] => -39 [1] => -70 [2] => 206 )
Output for 5.5.33
Array ( [0] => 74 [1] => 14 [2] => 9 )
Output for 5.5.32
Array ( [0] => 52 [1] => 85 [2] => -40 )
Output for 5.5.31
Array ( [0] => 2 [1] => 60 [2] => 35 )
Output for 5.5.30
Array ( [0] => -15 [1] => -66 [2] => 178 )
Output for 5.5.29
Array ( [0] => 52 [1] => -86 [2] => 131 )
Output for 5.5.28
Array ( [0] => 95 [1] => 88 [2] => -86 )
Output for 5.5.27
Array ( [0] => -45 [1] => 39 [2] => 103 )
Output for 5.5.26
Array ( [0] => 59 [1] => 46 [2] => -8 )
Output for 5.5.25
Array ( [0] => 91 [1] => 22 [2] => -16 )
Output for 5.5.24
Array ( [0] => 76 [1] => -10 [2] => 31 )
Output for 5.5.23
Array ( [0] => -8 [1] => 96 [2] => 9 )
Output for 5.5.22
Array ( [0] => -6 [1] => 22 [2] => 81 )
Output for 5.5.21
Array ( [0] => -57 [1] => 11 [2] => 143 )
Output for 5.5.20
Array ( [0] => 25 [1] => -73 [2] => 145 )
Output for 5.5.19
Array ( [0] => 6 [1] => -66 [2] => 157 )
Output for 5.5.18
Array ( [0] => 74 [1] => -99 [2] => 122 )
Output for 5.5.16
Array ( [0] => -35 [1] => 99 [2] => 33 )
Output for 5.5.15
Array ( [0] => 33 [1] => -39 [2] => 103 )
Output for 5.5.14
Array ( [0] => 83 [1] => 46 [2] => -32 )
Output for 5.5.13
Array ( [0] => 49 [1] => -85 [2] => 133 )
Output for 5.5.12
Array ( [0] => -87 [1] => -21 [2] => 205 )
Output for 5.5.11
Array ( [0] => -70 [1] => -92 [2] => 259 )
Output for 5.5.10
Array ( [0] => 55 [1] => -11 [2] => 53 )
Output for 5.5.9
Array ( [0] => -59 [1] => 17 [2] => 139 )
Output for 5.5.8
Array ( [0] => 8 [1] => -81 [2] => 170 )
Output for 5.5.7
Array ( [0] => 40 [1] => 3 [2] => 54 )
Output for 5.5.6
Array ( [0] => 54 [1] => -76 [2] => 119 )
Output for 5.5.5
Array ( [0] => 94 [1] => 81 [2] => -78 )
Output for 5.5.4
Array ( [0] => 94 [1] => -13 [2] => 16 )
Output for 5.5.3
Array ( [0] => 13 [1] => 9 [2] => 75 )
Output for 5.5.2
Array ( [0] => -71 [1] => 21 [2] => 147 )
Output for 5.5.1
Array ( [0] => -78 [1] => -59 [2] => 234 )
Output for 5.5.0
Array ( [0] => 12 [1] => 43 [2] => 42 )
Output for 5.4.45
Array ( [0] => 64 [1] => 38 [2] => -5 )
Output for 5.4.44
Array ( [0] => 95 [1] => -67 [2] => 69 )
Output for 5.4.43
Array ( [0] => -3 [1] => -78 [2] => 178 )
Output for 5.4.42
Array ( [0] => 17 [1] => 4 [2] => 76 )
Output for 5.4.41
Array ( [0] => -79 [1] => -43 [2] => 219 )
Output for 5.4.40
Array ( [0] => 86 [1] => 6 [2] => 5 )
Output for 5.4.39
Array ( [0] => 97 [1] => -91 [2] => 91 )
Output for 5.4.38
Array ( [0] => -41 [1] => -49 [2] => 187 )
Output for 5.4.37
Array ( [0] => -10 [1] => 20 [2] => 87 )
Output for 5.4.36
Array ( [0] => 67 [1] => 47 [2] => -17 )
Output for 5.4.35
Array ( [0] => 2 [1] => -84 [2] => 179 )
Output for 5.4.34
Array ( [0] => 18 [1] => -56 [2] => 135 )
Output for 5.4.32
Array ( [0] => -97 [1] => -81 [2] => 275 )
Output for 5.4.31
Array ( [0] => 89 [1] => 36 [2] => -28 )
Output for 5.4.30
Array ( [0] => -44 [1] => -44 [2] => 185 )
Output for 5.4.29
Array ( [0] => 65 [1] => -76 [2] => 108 )
Output for 5.4.28
Array ( [0] => 68 [1] => -75 [2] => 104 )
Output for 5.4.27
Array ( [0] => -67 [1] => 65 [2] => 99 )
Output for 5.4.26
Array ( [0] => 10 [1] => 97 [2] => -10 )
Output for 5.4.25
Array ( [0] => 57 [1] => -19 [2] => 59 )
Output for 5.4.24
Array ( [0] => -69 [1] => 48 [2] => 118 )
Output for 5.4.23
Array ( [0] => 82 [1] => -11 [2] => 26 )
Output for 5.4.22
Array ( [0] => -23 [1] => -100 [2] => 220 )
Output for 5.4.21
Array ( [0] => 67 [1] => 37 [2] => -7 )
Output for 5.4.20
Array ( [0] => 69 [1] => 1 [2] => 27 )
Output for 5.4.19
Array ( [0] => 75 [1] => 79 [2] => -57 )
Output for 5.4.18
Array ( [0] => -22 [1] => -84 [2] => 203 )
Output for 5.4.17
Array ( [0] => 67 [1] => -88 [2] => 118 )
Output for 5.4.16
Array ( [0] => -32 [1] => -66 [2] => 195 )
Output for 5.4.15
Array ( [0] => 46 [1] => 81 [2] => -30 )
Output for 5.4.14
Array ( [0] => 78 [1] => -20 [2] => 39 )
Output for 5.4.13
Array ( [0] => -99 [1] => -57 [2] => 253 )
Output for 5.4.12
Array ( [0] => -12 [1] => -56 [2] => 165 )
Output for 5.4.11
Array ( [0] => -54 [1] => 99 [2] => 52 )
Output for 5.4.10
Array ( [0] => -51 [1] => 32 [2] => 116 )
Output for 5.4.9
Array ( [0] => 99 [1] => 67 [2] => -69 )
Output for 5.4.8
Array ( [0] => 41 [1] => -40 [2] => 96 )
Output for 5.4.7
Array ( [0] => 91 [1] => -67 [2] => 73 )
Output for 5.4.6
Array ( [0] => -42 [1] => -14 [2] => 153 )
Output for 5.4.5
Array ( [0] => 25 [1] => -35 [2] => 107 )
Output for 5.4.4
Array ( [0] => -71 [1] => 12 [2] => 156 )
Output for 5.4.3
Array ( [0] => 30 [1] => -61 [2] => 128 )
Output for 5.4.2
Array ( [0] => 38 [1] => -34 [2] => 93 )
Output for 5.4.1
Array ( [0] => 58 [1] => 15 [2] => 24 )
Output for 5.4.0
Array ( [0] => 1 [1] => 68 [2] => 28 )
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/lJXGG on line 10
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected '[' in /in/lJXGG on line 10
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/lJXGG on line 10
Process exited with code 255.