Changeset View
Changeset View
Standalone View
Standalone View
src/utils/PhutilSystem.php
Context not available. | |||||
$map = array(); | $map = array(); | ||||
foreach ($data as $line) { | foreach ($data as $line) { | ||||
list($key, $value) = explode(':', $line, 2); | list($key, $value) = @explode(':', $line, 2); | ||||
$key = trim($key); | $key = trim($key); | ||||
$value = trim($value); | $value = trim($value); | ||||
$matches = null; | $matches = null; | ||||
if (preg_match('/^(\d+) kB\z/', $value, $matches)) { | if (@preg_match('/^(\d+) kB\z/', $value, $matches)) { | ||||
$value = (int)$matches[1] * 1024; | $value = (int)$matches[1] * 1024; | ||||
} | } | ||||
Context not available. | |||||
$map = array(); | $map = array(); | ||||
foreach ($data as $line) { | foreach ($data as $line) { | ||||
list($key, $value) = explode(':', $line, 2); | list($key, $value) = @explode(':', $line, 2); | ||||
$key = trim($key); | $key = trim($key); | ||||
$value = trim($value); | $value = trim($value); | ||||
$matches = null; | $matches = null; | ||||
if (preg_match('/page size of (\d+) bytes/', $value, $matches)) { | if (@preg_match('/page size of (\d+) bytes/', $value, $matches)) { | ||||
$page_size = (int)$matches[1]; | $page_size = (int)$matches[1]; | ||||
continue; | continue; | ||||
} | } | ||||
Context not available. |
Content licensed under Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) unless otherwise noted; code licensed under Apache 2.0 or other open source licenses. · CC BY-SA 4.0 · Apache 2.0