3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php #params = array('limit' => -1); $limit = $params['limit']; for($i = 0; $i < 100; $i++) { $data[$i] = array( 'uid' => $i, 'userid' => 'extrauser' . $i ); } asort($data); print_r(array_slice($data, $start, $limit));
Output for 5.2.4 - 7.1.0
Notice: Undefined variable: params in /in/UpRaU on line 3 Notice: Undefined variable: start in /in/UpRaU on line 11 Array ( [0] => Array ( [uid] => 0 [userid] => extrauser0 ) [1] => Array ( [uid] => 1 [userid] => extrauser1 ) [2] => Array ( [uid] => 2 [userid] => extrauser2 ) [3] => Array ( [uid] => 3 [userid] => extrauser3 ) [4] => Array ( [uid] => 4 [userid] => extrauser4 ) [5] => Array ( [uid] => 5 [userid] => extrauser5 ) [6] => Array ( [uid] => 6 [userid] => extrauser6 ) [7] => Array ( [uid] => 7 [userid] => extrauser7 ) [8] => Array ( [uid] => 8 [userid] => extrauser8 ) [9] => Array ( [uid] => 9 [userid] => extrauser9 ) [10] => Array ( [uid] => 10 [userid] => extrauser10 ) [11] => Array ( [uid] => 11 [userid] => extrauser11 ) [12] => Array ( [uid] => 12 [userid] => extrauser12 ) [13] => Array ( [uid] => 13 [userid] => extrauser13 ) [14] => Array ( [uid] => 14 [userid] => extrauser14 ) [15] => Array ( [uid] => 15 [userid] => extrauser15 ) [16] => Array ( [uid] => 16 [userid] => extrauser16 ) [17] => Array ( [uid] => 17 [userid] => extrauser17 ) [18] => Array ( [uid] => 18 [userid] => extrauser18 ) [19] => Array ( [uid] => 19 [userid] => extrauser19 ) [20] => Array ( [uid] => 20 [userid] => extrauser20 ) [21] => Array ( [uid] => 21 [userid] => extrauser21 ) [22] => Array ( [uid] => 22 [userid] => extrauser22 ) [23] => Array ( [uid] => 23 [userid] => extrauser23 ) [24] => Array ( [uid] => 24 [userid] => extrauser24 ) [25] => Array ( [uid] => 25 [userid] => extrauser25 ) [26] => Array ( [uid] => 26 [userid] => extrauser26 ) [27] => Array ( [uid] => 27 [userid] => extrauser27 ) [28] => Array ( [uid] => 28 [userid] => extrauser28 ) [29] => Array ( [uid] => 29 [userid] => extrauser29 ) [30] => Array ( [uid] => 30 [userid] => extrauser30 ) [31] => Array ( [uid] => 31 [userid] => extrauser31 ) [32] => Array ( [uid] => 32 [userid] => extrauser32 ) [33] => Array ( [uid] => 33 [userid] => extrauser33 ) [34] => Array ( [uid] => 34 [userid] => extrauser34 ) [35] => Array ( [uid] => 35 [userid] => extrauser35 ) [36] => Array ( [uid] => 36 [userid] => extrauser36 ) [37] => Array ( [uid] => 37 [userid] => extrauser37 ) [38] => Array ( [uid] => 38 [userid] => extrauser38 ) [39] => Array ( [uid] => 39 [userid] => extrauser39 ) [40] => Array ( [uid] => 40 [userid] => extrauser40 ) [41] => Array ( [uid] => 41 [userid] => extrauser41 ) [42] => Array ( [uid] => 42 [userid] => extrauser42 ) [43] => Array ( [uid] => 43 [userid] => extrauser43 ) [44] => Array ( [uid] => 44 [userid] => extrauser44 ) [45] => Array ( [uid] => 45 [userid] => extrauser45 ) [46] => Array ( [uid] => 46 [userid] => extrauser46 ) [47] => Array ( [uid] => 47 [userid] => extrauser47 ) [48] => Array ( [uid] => 48 [userid] => extrauser48 ) [49] => Array ( [uid] => 49 [userid] => extrauser49 ) [50] => Array ( [uid] => 50 [userid] => extrauser50 ) [51] => Array ( [uid] => 51 [userid] => extrauser51 ) [52] => Array ( [uid] => 52 [userid] => extrauser52 ) [53] => Array ( [uid] => 53 [userid] => extrauser53 ) [54] => Array ( [uid] => 54 [userid] => extrauser54 ) [55] => Array ( [uid] => 55 [userid] => extrauser55 ) [56] => Array ( [uid] => 56 [userid] => extrauser56 ) [57] => Array ( [uid] => 57 [userid] => extrauser57 ) [58] => Array ( [uid] => 58 [userid] => extrauser58 ) [59] => Array ( [uid] => 59 [userid] => extrauser59 ) [60] => Array ( [uid] => 60 [userid] => extrauser60 ) [61] => Array ( [uid] => 61 [userid] => extrauser61 ) [62] => Array ( [uid] => 62 [userid] => extrauser62 ) [63] => Array ( [uid] => 63 [userid] => extrauser63 ) [64] => Array ( [uid] => 64 [userid] => extrauser64 ) [65] => Array ( [uid] => 65 [userid] => extrauser65 ) [66] => Array ( [uid] => 66 [userid] => extrauser66 ) [67] => Array ( [uid] => 67 [userid] => extrauser67 ) [68] => Array ( [uid] => 68 [userid] => extrauser68 ) [69] => Array ( [uid] => 69 [userid] => extrauser69 ) [70] => Array ( [uid] => 70 [userid] => extrauser70 ) [71] => Array ( [uid] => 71 [userid] => extrauser71 ) [72] => Array ( [uid] => 72 [userid] => extrauser72 ) [73] => Array ( [uid] => 73 [userid] => extrauser73 ) [74] => Array ( [uid] => 74 [userid] => extrauser74 ) [75] => Array ( [uid] => 75 [userid] => extrauser75 ) [76] => Array ( [uid] => 76 [userid] => extrauser76 ) [77] => Array ( [uid] => 77 [userid] => extrauser77 ) [78] => Array ( [uid] => 78 [userid] => extrauser78 ) [79] => Array ( [uid] => 79 [userid] => extrauser79 ) [80] => Array ( [uid] => 80 [userid] => extrauser80 ) [81] => Array ( [uid] => 81 [userid] => extrauser81 ) [82] => Array ( [uid] => 82 [userid] => extrauser82 ) [83] => Array ( [uid] => 83 [userid] => extrauser83 ) [84] => Array ( [uid] => 84 [userid] => extrauser84 ) [85] => Array ( [uid] => 85 [userid] => extrauser85 ) [86] => Array ( [uid] => 86 [userid] => extrauser86 ) [87] => Array ( [uid] => 87 [userid] => extrauser87 ) [88] => Array ( [uid] => 88 [userid] => extrauser88 ) [89] => Array ( [uid] => 89 [userid] => extrauser89 ) [90] => Array ( [uid] => 90 [userid] => extrauser90 ) [91] => Array ( [uid] => 91 [userid] => extrauser91 ) [92] => Array ( [uid] => 92 [userid] => extrauser92 ) [93] => Array ( [uid] => 93 [userid] => extrauser93 ) [94] => Array ( [uid] => 94 [userid] => extrauser94 ) [95] => Array ( [uid] => 95 [userid] => extrauser95 ) [96] => Array ( [uid] => 96 [userid] => extrauser96 ) [97] => Array ( [uid] => 97 [userid] => extrauser97 ) [98] => Array ( [uid] => 98 [userid] => extrauser98 ) [99] => Array ( [uid] => 99 [userid] => extrauser99 ) )
Output for 5.0.4 - 5.2.3
Notice: Undefined variable: params in /in/UpRaU on line 3 Notice: Undefined variable: start in /in/UpRaU on line 11 Array ( )
Output for 4.3.0 - 5.0.3
Notice: Undefined variable: params in /in/UpRaU on line 3 Notice: Undefined variable: start in /in/UpRaU on line 11 Array ( )