<?php
$str = '';
for ($i = 0; $i < 1e4; $i++) {
$str .= md5(time());
}
echo strlen($str);
$memory = memory_get_usage(true);
substr($str, 0);
echo memory_get_usage(true)-$memory;
- Output for 5.2.1 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.0 - 5.5.37, 5.6.0 - 5.6.28, 7.0.0 - 7.0.20, 7.1.0 - 7.1.7, 7.2.0
- 3200000
- Output for 5.0.0 - 5.0.5, 5.1.0 - 5.1.6, 5.2.0
- 320000
Fatal error: Call to undefined function memory_get_usage() in /in/YkXEZ on line 9
Process exited with code 255. - Output for 4.4.5 - 4.4.9
- 320000
Fatal error: Call to undefined function: memory_get_usage() in /in/YkXEZ on line 9
Process exited with code 255. - Output for 4.3.2 - 4.3.11, 4.4.0 - 4.4.4
- 320000
Fatal error: Call to undefined function: memory_get_usage() in /in/YkXEZ on line 9
Process exited with code 255. - Output for 4.3.0 - 4.3.1
- 320000
Fatal error: Call to undefined function: memory_get_usage() in /in/YkXEZ on line 9
preferences:
121.08 ms | 401 KiB | 212 Q