comparison vendor/symfony/http-kernel/DataCollector/MemoryDataCollector.php @ 17:129ea1e6d783

Update, including to Drupal core 8.6.10
author Chris Cannam
date Thu, 28 Feb 2019 13:21:36 +0000
parents 1fec387a4317
children
comparison
equal deleted inserted replaced
16:c2387f117808 17:129ea1e6d783
37 /** 37 /**
38 * {@inheritdoc} 38 * {@inheritdoc}
39 */ 39 */
40 public function reset() 40 public function reset()
41 { 41 {
42 $this->data = array( 42 $this->data = [
43 'memory' => 0, 43 'memory' => 0,
44 'memory_limit' => $this->convertToBytes(ini_get('memory_limit')), 44 'memory_limit' => $this->convertToBytes(ini_get('memory_limit')),
45 ); 45 ];
46 } 46 }
47 47
48 /** 48 /**
49 * {@inheritdoc} 49 * {@inheritdoc}
50 */ 50 */
96 } 96 }
97 97
98 $memoryLimit = strtolower($memoryLimit); 98 $memoryLimit = strtolower($memoryLimit);
99 $max = strtolower(ltrim($memoryLimit, '+')); 99 $max = strtolower(ltrim($memoryLimit, '+'));
100 if (0 === strpos($max, '0x')) { 100 if (0 === strpos($max, '0x')) {
101 $max = intval($max, 16); 101 $max = \intval($max, 16);
102 } elseif (0 === strpos($max, '0')) { 102 } elseif (0 === strpos($max, '0')) {
103 $max = intval($max, 8); 103 $max = \intval($max, 8);
104 } else { 104 } else {
105 $max = (int) $max; 105 $max = (int) $max;
106 } 106 }
107 107
108 switch (substr($memoryLimit, -1)) { 108 switch (substr($memoryLimit, -1)) {