<?php
var_dump(array_map(function($no){
$value = str_pad($no, 2, '0', STR_PAD_LEFT);
return "<th>$value</th>";
}, range(0,24)));
- Output for 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.24 - 5.5.35, 5.6.8 - 5.6.28, 7.0.0 - 7.0.20, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.4, 8.3.6
- array(25) {
[0]=>
string(11) "<th>00</th>"
[1]=>
string(11) "<th>01</th>"
[2]=>
string(11) "<th>02</th>"
[3]=>
string(11) "<th>03</th>"
[4]=>
string(11) "<th>04</th>"
[5]=>
string(11) "<th>05</th>"
[6]=>
string(11) "<th>06</th>"
[7]=>
string(11) "<th>07</th>"
[8]=>
string(11) "<th>08</th>"
[9]=>
string(11) "<th>09</th>"
[10]=>
string(11) "<th>10</th>"
[11]=>
string(11) "<th>11</th>"
[12]=>
string(11) "<th>12</th>"
[13]=>
string(11) "<th>13</th>"
[14]=>
string(11) "<th>14</th>"
[15]=>
string(11) "<th>15</th>"
[16]=>
string(11) "<th>16</th>"
[17]=>
string(11) "<th>17</th>"
[18]=>
string(11) "<th>18</th>"
[19]=>
string(11) "<th>19</th>"
[20]=>
string(11) "<th>20</th>"
[21]=>
string(11) "<th>21</th>"
[22]=>
string(11) "<th>22</th>"
[23]=>
string(11) "<th>23</th>"
[24]=>
string(11) "<th>24</th>"
}
- Output for 8.3.5
- Warning: PHP Startup: Unable to load dynamic library 'sodium.so' (tried: /usr/lib/php/8.3.5/modules/sodium.so (libsodium.so.23: cannot open shared object file: No such file or directory), /usr/lib/php/8.3.5/modules/sodium.so.so (/usr/lib/php/8.3.5/modules/sodium.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
array(25) {
[0]=>
string(11) "<th>00</th>"
[1]=>
string(11) "<th>01</th>"
[2]=>
string(11) "<th>02</th>"
[3]=>
string(11) "<th>03</th>"
[4]=>
string(11) "<th>04</th>"
[5]=>
string(11) "<th>05</th>"
[6]=>
string(11) "<th>06</th>"
[7]=>
string(11) "<th>07</th>"
[8]=>
string(11) "<th>08</th>"
[9]=>
string(11) "<th>09</th>"
[10]=>
string(11) "<th>10</th>"
[11]=>
string(11) "<th>11</th>"
[12]=>
string(11) "<th>12</th>"
[13]=>
string(11) "<th>13</th>"
[14]=>
string(11) "<th>14</th>"
[15]=>
string(11) "<th>15</th>"
[16]=>
string(11) "<th>16</th>"
[17]=>
string(11) "<th>17</th>"
[18]=>
string(11) "<th>18</th>"
[19]=>
string(11) "<th>19</th>"
[20]=>
string(11) "<th>20</th>"
[21]=>
string(11) "<th>21</th>"
[22]=>
string(11) "<th>22</th>"
[23]=>
string(11) "<th>23</th>"
[24]=>
string(11) "<th>24</th>"
}
- Output for 4.4.2 - 4.4.9, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17
- Parse error: syntax error, unexpected T_FUNCTION, expecting ')' in /in/S1mh4 on line 3
Process exited with code 255. - Output for 4.3.0 - 4.3.1, 4.3.5 - 4.3.11, 4.4.0 - 4.4.1, 5.0.0 - 5.0.5
- Parse error: parse error, unexpected T_FUNCTION, expecting ')' in /in/S1mh4 on line 3
Process exited with code 255. - Output for 4.3.2 - 4.3.4
- Parse error: parse error, expecting `')'' in /in/S1mh4 on line 3
Process exited with code 255.
preferences:
242.36 ms | 401 KiB | 354 Q